diff --git a/client/catalog-dev/js/catalog.js b/client/catalog-dev/js/catalog.js
index 5b953d8..1e4866c 100644
--- a/client/catalog-dev/js/catalog.js
+++ b/client/catalog-dev/js/catalog.js
@@ -170,9 +170,25 @@
       scope.autoComplete(path, function(data){
         var list = data.next;
         var last = (data.lastComponent === true);
+
+        if (last) {
+          console.log("Redirecting last element request to a search.");
+          scope.clearResults();
+          scope.query(scope.catalog, {'??': path},
+          function(interest, data){
+            console.log("Search response", interest, data);
+            scope.name = data.getContent().toString().replace(/[\n\0]+/g, '');
+            scope.getResults(0);
+          }, function(interest){
+            console.warn("Failed to retrieve final component.", interest, path);
+            scope.createAlert("Failed to request final component. " + path + " See console for details.");
+          });
+          return; //Don't call the callback
+        }
+
         console.log("Autocomplete response", list);
         callback(list.map(function(element){
-          return (path == "/"?"/":"") + element + (!last?"/":"");
+          return (path == "/"?"/":"") + element + "/";
         }));
       })
     });
@@ -184,7 +200,7 @@
 
       var path = t.parent().parent().attr('id');
 
-      console.log("Stringing tree search:", path);
+      console.log("Tree search:", path);
 
       scope.query(scope.catalog, {'??': path},
       function(interest, data){ //Success
diff --git a/client/catalog-dev/js/treeExplorer.js b/client/catalog-dev/js/treeExplorer.js
index c4bee42..58a6a69 100644
--- a/client/catalog-dev/js/treeExplorer.js
+++ b/client/catalog-dev/js/treeExplorer.js
@@ -38,8 +38,8 @@
           var el = $('<div class="treeExplorerNode"></div>');
           if (current.match(/\/$/)){
             el.attr('id', path + current);
-            el.append(['<div class="nodeContent"><a href="#', path, current, '">', current,
-              '</a>&nbsp;<button class="treeSearch btn btn-success btn-xs">Search from here</button></div>'].join(""));
+            el.append(['<div class="nodeContent"><a class="treeExplorerExpander"></a><a class="treeSearch" href="#', path, current, '">', current,
+              '</a></div>'].join(""));
           } else {
             el.addClass('file');
             el.text(current);
@@ -50,7 +50,7 @@
 
       var scope = this;
 
-      tree.on('click', '.treeExplorerNode > .nodeContent > a', function(e){
+      tree.on('click', '.treeExplorerExpander', function(e){
         if (!scope.settings.autoScroll){
           e.preventDefault();
         }
