diff --git a/templates/index.html.ep b/templates/index.html.ep
index 0a2a408..3f4de00 100644
--- a/templates/index.html.ep
+++ b/templates/index.html.ep
@@ -62,7 +62,6 @@
          }
 
          % use Mojo::ByteStream 'b';
-         % my $urlprefix = url_with->query([word=>'']);
          var paraResults = <%= b(Mojo::JSON::to_json($lists)) %>;
          var urlprefix =  new URLSearchParams(window.location.search);
          if (paraResults.length > 0  && paraResults[0] != null) {
@@ -76,7 +75,7 @@
                  nranks = nranks.concat(paraResults[i].map(function(a){return a.rank;}));
                  nmarked = nmarked.concat(paraResults[i].map(function(a){return a.marked;}));
              }
-             showMap({target: " "+urlParams.get('word')+" ", mergedEnd: 0, words: nwords, vecs: nvecs, ranks: nranks, marked: nmarked, urlprefix: "?"+urlprefix} );
+             showMap({target: " "+urlParams.get('word')+" ", mergedEnd: 0, words: nwords, vecs: nvecs, ranks: nranks, marked: nmarked} );
              var t = $('#firsttable').DataTable({
                  data: paraResults[0],
                  "sScrollY": "780px",
@@ -500,8 +499,8 @@
                 T.Y[i][0] = (d.x - mapWidth/2 - tx)/ss/20;
                 T.Y[i][1] = (d.y - mapHeight/2 - ty)/ss/20;
                 return "translate(" +
-                           (d.x) + "," +
-                           (d.y) + ")";
+                                (d.x) + "," +
+                                (d.y) + ")";
             });
      }
 
@@ -511,8 +510,8 @@
             .data(data.words)
             .attr("transform", function(d, i) {
                 return "translate(" +
-                            ((Y[i][0]*20*ss + tx) + mapWidth/2) + "," +
-                            ((Y[i][1]*20*ss + ty) + mapHeight/2) + ")"; });
+                                 ((Y[i][0]*20*ss + tx) + mapWidth/2) + "," +
+                                 ((Y[i][1]*20*ss + ty) + mapHeight/2) + ")"; });
      }
 
      var svg;
@@ -522,6 +521,9 @@
 
      function drawEmbedding() {
          var urlprefix =  new URLSearchParams(window.location.search);
+         urlprefix.delete("word");
+         urlprefix.append("word","");
+
          $("#embed").empty();
          var div = d3.select("#embed");
 
@@ -539,7 +541,7 @@
 
          g.append("a")
           .attr("xlink:href", function(word) {
-              urlprefix.set("word", word); return "?"+urlprefix; })
+              return "?"+urlprefix+word; })
           .attr("class", function(d, i) {
               var res="";
               if(data.marked[i]) {
@@ -616,12 +618,12 @@
 
          //  setTimeout(updateEmbedding, 1);
          //  setTimeout(
-             labeler =   d3.labeler()
-                           .label(labels)
-                           .anchor(anchor_array)
-                           .width(mapWidth)
-                           .height(mapHeight)
-                           .update(applyJitter);
+         labeler =   d3.labeler()
+                       .label(labels)
+                       .anchor(anchor_array)
+                       .width(mapWidth)
+                       .height(mapHeight)
+                       .update(applyJitter);
          //         .start(1000);
 
          iter_id = setInterval(jitterStep, 1);
