diff --git a/client/catalog/README.md b/client/catalog/README.md
index ff0d2e9..042551b 100644
--- a/client/catalog/README.md
+++ b/client/catalog/README.md
@@ -16,3 +16,20 @@
   + If it doesn't exist, you will need to copy it from the config-example.json
   + config.json is intentionally left out of the git to prevent overwriting it.
 
+config.json
+-----------
+
+catalogPrefix - This is where you are doing your catalog queries. This should be the root of where we are querying in ndn.
+
+faceConfig - Configure where you have your backend running and on which port it is listening. To setup a new backend, please read the readme at the root of the repo.
+
+
+Changing the theme
+------------------
+
+Currently the theme is a modified bootstrap theme that is running larger fonts and custom colors.
+
+If you would like to modify the theme go to [this url](http://bootstrap-live-customizer.com/). To modify the current theme, then upload the variables.less in this folder, make your modifications, and overwrite the variables.less file when you are done (and the theme.min.css).
+
+
+
diff --git a/client/catalog/autocomplete.js b/client/catalog/autocomplete.js
index b160dcb..2cda884 100644
--- a/client/catalog/autocomplete.js
+++ b/client/catalog/autocomplete.js
@@ -28,12 +28,6 @@
         'top': this.parent().height()
       });
 
-//      this.focus(function(){
-//        element.slideDown();
-//      }).blur(function(){
-//        element.slideUp();
-//      }).before(element);
-
       this.after(element);
 
       var getSuggestions = function(current, callback){
@@ -45,7 +39,10 @@
         }, []));
       }
 
+      var lastList = [];
+
       var setAutoComplete = function(list){
+        lastList = list;
         element.empty();
 
         element.html(list.reduce(function(prev, current){
@@ -60,6 +57,17 @@
 
       var input = this;
 
+      var matcher = /^\/([-_\w]+\/)*/; //Returns only the absolute path.
+
+      var getValue = function(){
+        var res = matcher.exec(input.val());
+        if (res){
+          return res[0]; //Return the absolute match
+        } else {
+          throw new Error("Empty or incorrectly formatted path.");
+        }
+      }
+
       element.bind('click', 'a', function(){
         input.val($(this).text());
       });
@@ -101,15 +109,30 @@
           break;
 
           case 9: //Tab
-          getSuggestions(input.val(), setAutoComplete);
+          getSuggestions(getValue(), setAutoComplete);
           e.preventDefault(); //Don't print tab or select a different element.
           break;
+
+          default:
+          var val = input.val(); //Needs to be unfiltered, for filtering existing results.
+          setAutoComplete(lastList.reduce(function(prev, current){
+            if (current.indexOf(val) === 0){
+              prev.push(current);
+            }
+            return prev;
+          }, []));
+
         }
 
+      })
+      .keyup(function(e){
+        if (e.which === 191){
+          getSuggestions(getValue(), setAutoComplete);
+        }
       });
 
       this.on('autoComplete', function(){
-        getSuggestions(input.val(), setAutoComplete);
+        getSuggestions(getValue(), setAutoComplete);
       });
 
       return this;
diff --git a/client/catalog/catalog.js b/client/catalog/catalog.js
index faac685..691f8ed 100644
--- a/client/catalog/catalog.js
+++ b/client/catalog/catalog.js
@@ -174,7 +174,6 @@
   }
 
   Atmos.prototype.autoComplete = function(field, callback){
-    console.log("Autocomplete triggered");
 
     if (this.searchInput.val().length === 0 && !filters.hasOwnProperty()){
       if (!this.searchBar.hasClass('has-error')){
@@ -192,13 +191,10 @@
 
       var ack = data.getName();
 
-      var name = new Name(scope.catalog).append('query-results').append(JSON.stringify(filters)).append(ack.get(-3)).append(ack.get(-2));
-
-      console.log(name.toUri(), filters);
+      var name = new Name(scope.catalog).append('query-results').append(JSON.stringify({"?": field})).append(ack.get(-3)).append(ack.get(-2));
 
       scope.face.expressInterest(new Interest(name).setInterestLifetimeMilliseconds(5000),
       function(interest, data){
-        console.log("Autocomplete query return: ", data.getContent().toString());
 
         if (data.getContent().length !== 0){
           var options = JSON.parse(data.getContent().toString().replace(/[\n\0]/g, "")).next.map(function(element){
diff --git a/client/catalog/index.html b/client/catalog/index.html
index 7458161..2f3b8c9 100644
--- a/client/catalog/index.html
+++ b/client/catalog/index.html
@@ -43,8 +43,8 @@
 
       <div class="col-sm-3 col-md-2 sidebar">
         <div class="panel panel-default">
-          <div class="panel-heading flex flex-row">
-            <span class="vertical-fix width-fix">Filter Categories</span>
+          <div class="panel-heading">
+            <span>Filter Categories</span>
           </div>
           <div class="panel-body">
             <ul id="side-menu" class="nav nav-pills nav-stacked"></ul>
@@ -70,8 +70,8 @@
             <form class="form-inline" id="searchBar">
               <div class="form-group">
                 <div class="input-group">
-                  <input id="search" placeholder="Enter a path" value="/"
-                   type="text" class="form-control" data-toggle="tooltip" data-placement="top"
+                  <input id="search" placeholder="Enter a path (Ex: /CMIP5)"
+                   type="text" class="form-control"
                    title="This bar is for doing a tab completion like path completion. Press tab, enter, or click AutoComplete to begin your search.">
                   <div class="input-group-btn">
                     <button id="autoCompleteSearch" type="submit" class="btn btn-primary">Search</button>
diff --git a/client/catalog/style.css b/client/catalog/style.css
index a9297a2..aa2d1b6 100644
--- a/client/catalog/style.css
+++ b/client/catalog/style.css
@@ -31,27 +31,6 @@
   border: none;
 }
 
-.flex {
-  display: flex;
-}
-
-.flex-row {
-  flex-display: row;
-}
-
-.vertical-fix {
-  line-height: 38px; /* Height of the button */
-  vertical-align: middle;
-}
-
-.width-fix {
-  flex: 1 auto;
-}
-
-.right-fix {
-  flex: auto;
-}
-
 .pager {
   /* margin: 0; */
 }
