diff --git a/client/.gitignore b/client/.gitignore
deleted file mode 100644
index 46d349a..0000000
--- a/client/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-node_modules
-catalog
-
diff --git a/client/autogen.sh b/client/autogen.sh
deleted file mode 100755
index 94690a3..0000000
--- a/client/autogen.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-if [ ! hash git 2>/dev/null ]; then
-  echo "git is required for this repo to function properly! Please install it.";
-  exit 1;
-fi
-
-git submodule init ndn-js && git submodule update
-cd ndn-js && ./waf configure && ./waf && cd ..
-
-if [ ! hash npm 2>/dev/null ]; then
-  echo "npm is required to build the production site. Only the dev site will be available.";
-
-else
-
-  if [ ! hash gulp 2>/dev/null ]; then
-    npm install -g gulp
-    npm install
-  fi
-
-  npm upgrade
-
-  gulp
-
-fi
-
diff --git a/client/catalog-dev/.gitignore b/client/catalog-dev/.gitignore
deleted file mode 100644
index d344ba6..0000000
--- a/client/catalog-dev/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-config.json
diff --git a/client/catalog-dev/config-example.json b/client/catalog/config-example.json
similarity index 100%
rename from client/catalog-dev/config-example.json
rename to client/catalog/config-example.json
diff --git a/client/config.json b/client/catalog/config.json
similarity index 100%
rename from client/config.json
rename to client/catalog/config.json
diff --git a/client/catalog-dev/css/cubeLoader.css b/client/catalog/css/cubeLoader.css
similarity index 100%
rename from client/catalog-dev/css/cubeLoader.css
rename to client/catalog/css/cubeLoader.css
diff --git a/client/catalog-dev/css/style.css b/client/catalog/css/style.css
similarity index 93%
rename from client/catalog-dev/css/style.css
rename to client/catalog/css/style.css
index f66938b..0146b6e 100644
--- a/client/catalog-dev/css/style.css
+++ b/client/catalog/css/style.css
@@ -153,22 +153,21 @@
   display: block;
 }
 
-.treeExplorer .treeExplorerExpander::before {
-  font-family: "Glyphicons Halflings";
-  content: "+";
+.treeExplorer .treeExplorerExpander:before {
+  content: "[+]";
   color: gray;
 }
 
-.treeExplorer .open > .nodeContent > .treeExplorerExpander::before {
-  content: "\2212";
+.treeExplorer .open > .nodeContent > .treeExplorerExpander:before {
+  content: "[-]";
 }
 
 .treeExplorer .file > .nodeContent > .treeExplorerExpander {
   cursor: default;
 }
 
-.treeExplorer .file > .nodeContent > .treeExplorerExpander::before {
-  content: "\e022"
+.treeExplorer .file > .nodeContent > .treeExplorerExpander:before {
+  content: "[=]"
 }
 
 #popup {
diff --git a/client/catalog-dev/css/theme.min.css b/client/catalog/css/theme.min.css
similarity index 100%
rename from client/catalog-dev/css/theme.min.css
rename to client/catalog/css/theme.min.css
diff --git a/client/catalog-dev/index.html b/client/catalog/index.html
similarity index 93%
rename from client/catalog-dev/index.html
rename to client/catalog/index.html
index 085ba75..78c0e73 100644
--- a/client/catalog-dev/index.html
+++ b/client/catalog/index.html
@@ -5,21 +5,19 @@
 <title>NDN Query and Retrieval Tool</title>
 
 <script>
-
 (function(i, s, o, g, r, a, m) {
-	i['GoogleAnalyticsObject'] = r;
-	i[r] = i[r] || function() {
-		(i[r].q = i[r].q || []).push(arguments)
-	}
-	,
-	i[r].l = 1 * new Date();
-	a = s.createElement(o),
-	m = s.getElementsByTagName(o)[0];
-	a.async = 1;
-	a.src = g;
-	m.parentNode.insertBefore(a, m)
+  i['GoogleAnalyticsObject'] = r;
+  i[r] = i[r] || function() {
+    (i[r].q = i[r].q || []).push(arguments)
+  }
+  ,
+  i[r].l = 1 * new Date();
+  a = s.createElement(o),
+  m = s.getElementsByTagName(o)[0];
+  a.async = 1;
+  a.src = g;
+  m.parentNode.insertBefore(a, m)
 })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
-
 ga('create', 'UA-64984905-1', 'auto');
 ga('send', 'pageview');
 </script>
@@ -104,8 +102,9 @@
         <a class="navbar-brand" data-toggle="tab" href="#filterSearch" id="brand-title">NDN Query and Retrieval Tool</a>
       </div>
       <ul class="navbar-nav nav">
-        <li class="active" id="search-tab"><a data-toggle="tab" href="#filterSearch">Search</a></li>
-        <li id="explore-tab"><a data-toggle="tab" href="#explore">Explore</a></li>
+        <li class="active" id="search-tab"><a data-toggle="tab" href="#filterSearch">Filter Search</a></li>
+        <li id="path-search-tab"><a data-toggle="tab" href="#path-search">Path Search</a></li>
+        <li id="tree-search-tab"><a data-toggle="tab" href="#tree-search">Tree Search</a></li>
       </ul>
     </div>
   </header>
@@ -138,7 +137,7 @@
           </div>
         </div>
 
-        <div class="tab-pane fade" id="explore">
+        <div class="tab-pane fade" id="path-search">
           <div class="panel panel-info" id="pathSearch">
             <div class="panel-heading">Path Search</div>
             <div class="panel-body">
@@ -154,7 +153,10 @@
               </form>
             </div>
           </div>
-          <div class="panel panel-info" id="treeSearchPane">
+        </div>
+
+        <div class="tab-pane fade" id="tree-search">
+      <div class="panel panel-info" id="treeSearchPane">
             <div class="panel-heading">Tree Search</div>
             <div class="panel-body" id="treeSearch">
               <div></div>
@@ -275,7 +277,7 @@
           </div>
         </form>
         <div>
-        	<div class="list-group" id="direct-download-list"></div>
+          <div class="list-group" id="direct-download-list"></div>
         </div>
       </div>
     </div>
diff --git a/client/catalog-dev/js/autocomplete.js b/client/catalog/js/autocomplete.js
similarity index 100%
rename from client/catalog-dev/js/autocomplete.js
rename to client/catalog/js/autocomplete.js
diff --git a/client/catalog-dev/js/catalog.js b/client/catalog/js/catalog.js
similarity index 92%
rename from client/catalog-dev/js/catalog.js
rename to client/catalog/js/catalog.js
index c3c49cf..880ea4e 100644
--- a/client/catalog-dev/js/catalog.js
+++ b/client/catalog/js/catalog.js
@@ -3,9 +3,9 @@
   "use strict";
   var config;
   var conversions;
-  Promise.all([
-  new Promise(function(resolve, reject) {
-    $.ajax('../config.json').done(function(data) {
+
+  Promise.all([new Promise(function(resolve, reject) {
+    $.ajax('config.json').done(function(data) {
       config = data;
       resolve();
     }).fail(function() {
@@ -13,8 +13,7 @@
       ga('send', 'event', 'error', 'config');
       reject();
     });
-  }),
-  new Promise(function(resolve, reject) {
+  }), new Promise(function(resolve, reject) {
     var timeout = setTimeout(function() {
       console.error("Document never loaded? Something bad has happened!");
       reject();
@@ -23,28 +22,24 @@
       clearTimeout(timeout);
       resolve();
     });
-  }),
-  new Promise(function(resolve, reject) {
+  }), new Promise(function(resolve, reject) {
     $.getJSON('../conversions.json').done(function(data) {
       conversions = data;
       resolve();
-    }).fail(function(){
+    }).fail(function() {
       console.error("Failed to get conversions.");
       ga('send', 'event', 'error', 'config');
       //reject(); We will continue anyways. We don't need this functionality.
       conversions = {};
       resolve();
     });
-  })
-  ]).then(function() {
-
+  })]).then(function() {
     var getParameterByName = function(name) {
       name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
       var regex = new RegExp("[\\?&]" + name + "=([^&#]*)");
       var results = regex.exec(location.search);
-      return results === null  ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
+      return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
     }
-
     //Overwrite config if present. Any failure will just cause this to be skipped.
     try {
       var configParam = JSON.parse(getParameterByName('config'));
@@ -52,19 +47,16 @@
     } catch (e) {
       console.warn("Failure in config overwrite, skipping.", e);
     }
-
-    new Atmos(config, conversions);
+    new Atmos(config,conversions);
   }, function() {
     console.error("Failed to initialize!");
     ga('send', 'event', 'error', 'init');
   });
-})();
 
+})();
 var Atmos = (function() {
   "use strict";
-
   var closeButton = '<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>';
-
   var guid = function() {
     var d = new Date().getTime();
     var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
@@ -74,7 +66,6 @@
     });
     return uuid;
   }
-
   /**
    * Atmos
    * @version 2.0
@@ -86,7 +77,6 @@
    * @param {Object} config - Object of configuration options for a Face.
    */
   var Atmos = function(config, conversions) {
-
     //Internal variables.
     this.results = [];
     this.resultCount = Infinity;
@@ -101,7 +91,6 @@
 
     this.catalog = config['global']['catalogPrefix'];
     this.catalogPrefix = new Name(this.catalog);
-
     this.face = new Face(config['global']['faceConfig']);
 
     //Easy access dom variables
@@ -116,12 +105,10 @@
     this.requestForm = $('#requestForm');
 
     var scope = this;
-
     $('.requestSelectedButton').click(function() {
       ga('send', 'event', 'button', 'click', 'request');
       scope.request(scope.resultTable.find('.resultSelector:checked:not([disabled])').parent().parent());
     });
-
     this.filterSetup();
 
     //Init autocomplete
@@ -167,12 +154,14 @@
         scope.getResults(scope.page + 1);
       }
     });
+
     this.resultMenu.find('.previous').click(function() {
       ga('send', 'event', 'button', 'click', 'previous');
       if (!$(this).hasClass('disabled')) {
         scope.getResults(scope.page - 1);
       }
     });
+
     this.resultMenu.find('.clearResults').click(function() {
       ga('send', 'event', 'button', 'click', 'resultClear');
       scope.clearResults();
@@ -183,19 +172,15 @@
 
     //Change the number of results per page handler
     var rpps = $('.resultsPerPageSelector').click(function() {
-
       var t = $(this);
-
       if (t.hasClass('active')) {
         return;
       }
-
       rpps.find('.active').removeClass('active');
       t.addClass('active');
       scope.resultsPerPage = Number(t.text());
       scope.getResults(0);
       //Force return to page 1;
-
     });
 
     //Init tree search
@@ -205,14 +190,12 @@
       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) {
+          }, function(interest, data) {
             console.log("Search response", interest, data);
             scope.name = interest.getName();
             scope.getResults(0);
@@ -223,7 +206,6 @@
           return;
           //Don't call the callback
         }
-
         console.log("Autocomplete response", list);
         callback(list.map(function(element) {
           return (path == "/" ? "/" : "") + element + "/";
@@ -233,34 +215,24 @@
 
     $('#treeSearch').on('click', '.treeSearch', function() {
       var t = $(this);
-
       scope.clearResults();
-
       var path = t.parent().parent().attr('id');
-
       console.log("Tree search:", path);
-
       scope.query(scope.catalog, {
         '??': path
-      },
-      function(interest, data) {
+      }, function(interest, data) {
         //Success
         console.log("Tree search response", interest, data);
-
         scope.name = interest.getName();
-
         scope.getResults(0);
-      },
-      function(interest) {
+      }, function(interest) {
         //Failure
         console.warn("Request failed! Timeout", interest);
         scope.createAlert("Request timed out.\"" + interest.getName().toUri() + "\" See console for details.");
       });
-
     });
 
     this.setupRequestForm();
-
     this.resultTable.popover({
       selector: ".metaDataLink",
       content: function() {
@@ -287,14 +259,13 @@
     });
 
     //Allow the title to change the tab
-    $('#brand-title').click(function(){
+    $('#brand-title').click(function() {
       //Correct active class on tabs.
-      $('#explore-tab').removeClass('active');
+      $('#path-search-tab').removeClass('active');
+      $('#tree-search-tab').removeClass('active');
       $('#search-tab').addClass('active');
     });
-
   }
-
   Atmos.prototype.clearResults = function() {
     this.results = [];
     //Drop any old results.
@@ -306,66 +277,42 @@
 
   Atmos.prototype.pathSearch = function() {
     var value = this.searchInput.val();
-
     this.clearResults();
-
     var scope = this;
-
     this.query(this.catalog, {
       "??": value
-    },
-    function(interest, data) {
+    }, function(interest, data) {
       console.log("Query response:", interest, data);
-
       scope.name = interest.getName();
-
       scope.getResults(0);
-
-    },
-    function(interest) {
+    }, function(interest) {
       console.warn("Request failed! Timeout", interest);
       scope.createAlert("Request timed out. \"" + interest.getName().toUri() + "\" See console for details.");
     });
-
   }
 
   Atmos.prototype.search = function() {
-
     var filters = this.getFilters();
-
     console.log("Search started!", this.searchInput.val(), filters);
-
     console.log("Initiating query");
-
     this.clearResults();
-
     var scope = this;
-
-    this.query(this.catalog, filters,
-    function(interest, data) {
+    this.query(this.catalog, filters, function(interest, data) {
       //Response function
       console.log("Query Response:", interest, data);
-
       scope.name = interest.getName();
-
       scope.getResults(0);
-
     }, function(interest) {
       //Timeout function
       console.warn("Request failed after 3 attempts!", interest);
       scope.createAlert("Request failed after 3 attempts. \"" + interest.getName().toUri() + "\" See console for details.");
     });
-
   }
 
   Atmos.prototype.autoComplete = function(field, callback) {
-
     var scope = this;
-
     var result = {};
-
     const getAll = function(interest, data) {
-
       if (data.getContent().length !== 0) {
         var resp = JSON.parse(data.getContent().toString().replace(/[\n\0]/g, ""));
         if (result.next) {
@@ -376,11 +323,11 @@
       } else {
         callback(result);
       }
-
       var name = data.getName();
       var segment = name.components[name.getComponentCount() - 1];
-      if (segment.toSegment() !== data.getMetaInfo().getFinalBlockId().toSegment()){
-        name = name.getPrefix(-1); //Remove segment
+      if (segment.toSegment() !== data.getMetaInfo().getFinalBlockId().toSegment()) {
+        name = name.getPrefix(-1);
+        //Remove segment
         name.appendSegment(segment.toSegment() + 1);
         scope.expressInterest(name, getAll, function() {
           console.warn("Autocomplete timed out, results may be incomplete.");
@@ -390,28 +337,20 @@
       } else {
         callback(result);
       }
-
     }
-
     this.query(this.catalog, {
       "?": field
     }, getAll);
-
   }
 
   Atmos.prototype.showResults = function(resultIndex) {
-
     var results = this.results.slice(this.resultsPerPage * resultIndex, this.resultsPerPage * (resultIndex + 1));
-
-    var resultDOM = $(
-    results.reduce(function(prev, current) {
+    var resultDOM = $(results.reduce(function(prev, current) {
       prev.push('<tr><td><input class="resultSelector" type="checkbox"></td><td class="popover-container"><a href="#" class="metaDataLink">');
       prev.push(current);
       prev.push('</a></td></tr>');
       return prev;
-    }, ['<tr><th><input id="resultSelectAll" type="checkbox" title="Select All"> Select</th><th>Name</th></tr>']).join('')
-    );
-
+    }, ['<tr><th><input id="resultSelectAll" type="checkbox"> Select All</th><th>Name</th></tr>']).join(''));
     resultDOM.find('#resultSelectAll').click(function() {
       if ($(this).is(':checked')) {
         resultDOM.find('.resultSelector:not([disabled])').prop('checked', true);
@@ -419,31 +358,26 @@
         resultDOM.find('.resultSelector:not([disabled])').prop('checked', false);
       }
     });
-
     this.resultTable.hide().empty().append(resultDOM).slideDown('slow');
-
     this.resultMenu.find('.pageNumber').text(resultIndex + 1);
     this.resultMenu.find('.pageLength').text(this.resultsPerPage * resultIndex + results.length);
-
     if (this.resultsPerPage * (resultIndex + 1) >= this.resultCount) {
       this.resultMenu.find('.next').addClass('disabled');
     } else if (resultIndex === 0) {
       this.resultMenu.find('.next').removeClass('disabled');
     }
-
     if (resultIndex === 0) {
       this.resultMenu.find('.previous').addClass('disabled');
     } else if (resultIndex === 1) {
       this.resultMenu.find('.previous').removeClass('disabled');
     }
-
     $.scrollTo("#results", 500, {
       interrupt: true
     });
-
   }
 
   Atmos.prototype.getResults = function(index) {
+
     var scope = this;
 
     if ($('#results').hasClass('hidden')) {
@@ -463,17 +397,14 @@
     }
 
     var interestName = new Name(scope.name);
-
     // Interest name should be /<catalog-prefix>/query/<query-param>/<version>/<#seq>
     if (scope.name.size() === (scope.catalogPrefix.size() + 3)) {
       interestName = interestName.appendSegment(scope.retrievedSegments++);
       //console.log("Requesting data index: (", scope.retrievedSegments - 1, ") at ", interestName.toUri());
     }
 
-    this.expressInterest(interestName,
-    function(interest, data) {
+    this.expressInterest(interestName, function(interest, data) {
       //Response
-
       if (data.getContent().length === 0) {
         scope.resultMenu.find('.totalResults').text(0);
         scope.resultMenu.find('.pageNumber').text(0);
@@ -495,45 +426,29 @@
       }
 
       scope.results = scope.results.concat(content.results);
-
       scope.resultCount = content.resultCount;
-
       scope.resultMenu.find('.totalResults').text(scope.resultCount);
-
       scope.page = index;
-
       // reset scope.name
       scope.name = new Name(data.getName().getPrefix(scope.catalogPrefix.size() + 3));
-
       scope.getResults(index);
       //Keep calling this until we have enough data.
-
-    }, function() {}//Ignore failure
-    );
+    }, function() {});//Ignore failure
 
   }
-
   Atmos.prototype.query = function(prefix, parameters, callback, timeout) {
-
     var queryPrefix = new Name(prefix);
     queryPrefix.append("query");
-
     var jsonString = JSON.stringify(parameters);
     queryPrefix.append(jsonString);
-
     this.expressInterest(queryPrefix, callback, timeout);
-
   }
 
-
   Atmos.prototype.expressInterest = function(name, success, failure) {
-
     var interest = new Interest(name);
-    interest.setInterestLifetimeMilliseconds(1500);
+    interest.setInterestLifetimeMilliseconds(500);
     interest.setMustBeFresh(true);
-
     const face = this.face;
-
     async.retry(4, function(done) {
       face.expressInterest(interest, function(interest, data) {
         done();
@@ -547,7 +462,6 @@
         failure(interest);
       }
     });
-
   }
 
   /**
@@ -572,12 +486,10 @@
    * @param {string} type - Override the alert type.
    */
   Atmos.prototype.createAlert = function(message, type) {
-
     var alert = $('<div class="alert"><div>');
     alert.addClass(type ? type : 'alert-info');
     alert.text(message);
     alert.append(closeButton);
-
     this.alerts.append(alert);
   }
 
@@ -588,22 +500,19 @@
    * @param subsetFileName {String} If present then do a subsetting request instead.
    */
   Atmos.prototype.request = function() {
-
     //Pseudo globals.
     var keyChain;
     var certificateName;
     var keyAdded = false;
-
     return function(elements, subsetFilename) {
 
       var names = [];
+
       $(elements).find('.metaDataLink').each(function() {
         var name = $(this).text();
         names.push(name);
       });
-
       var subset = false;
-
       if (!subsetFilename) {
         $('#subsetting').hide();
       } else {
@@ -617,8 +526,9 @@
       //a single host with a small set of names. It is to demo the functionality but
       //could use improvement. (Multiple servers, non static list, etc)
       var directDls = $('#directDownloadList').empty();
-      names.forEach(function(name){
-        if (scope.conversions[name]){ //If the name exists in the conversions.
+      names.forEach(function(name) {
+        if (scope.conversions[name]) {
+          //If the name exists in the conversions.
           var ele = $('<a href="http://atmos-mwsc.ucar.edu/ucar/' + conversions[name] + '" class="list-group-item>' + name + '</a>');
           directDls.append(ele);
         }
@@ -627,9 +537,7 @@
       this.requestForm.on('submit', function(e) {
         //This will be registered for the next submit from the form.
         e.preventDefault();
-
         $('#request .alert').remove();
-
         var variables = [];
         if (subset) {
           $('#subsetVariables .row').each(function() {
@@ -655,12 +563,11 @@
         }
 
         $('#request').modal('hide');
-        //Initial params are ok. We can close the form.
 
+        //Initial params are ok. We can close the form.
         scope.cleanRequestForm();
 
-        $(this).off(e);
-        //Don't fire this again, the request must be regenerated
+        $(this).off(e); //Don't fire this again, the request must be regenerated
 
         //Key setup
         if (!keyAdded) {
@@ -669,39 +576,26 @@
             console.error("Missing/invalid key! This must be configured in the config on the server.", scope.config.demoKey);
             return;
           }
-
           //FIXME base64 may or may not exist in other browsers. Need a new polyfill.
           var pub = new Buffer(base64.toByteArray(scope.config.retrieval.demoKey.pub));
           //MUST be a Buffer (Buffer != Uint8Array)
           var priv = new Buffer(base64.toByteArray(scope.config.retrieval.demoKey.priv));
-
           var identityStorage = new MemoryIdentityStorage();
           var privateKeyStorage = new MemoryPrivateKeyStorage();
-          keyChain = new KeyChain(new IdentityManager(identityStorage,privateKeyStorage),
-          new SelfVerifyPolicyManager(identityStorage));
-
+          keyChain = new KeyChain(new IdentityManager(identityStorage,privateKeyStorage),new SelfVerifyPolicyManager(identityStorage));
           var keyName = new Name("/retrieve/DSK-123");
-          certificateName = keyName.getSubName(0, keyName.size() - 1)
-          .append("KEY").append(keyName.get(-1))
-          .append("ID-CERT").append("0");
-
+          certificateName = keyName.getSubName(0, keyName.size() - 1).append("KEY").append(keyName.get(-1)).append("ID-CERT").append("0");
           identityStorage.addKey(keyName, KeyType.RSA, new Blob(pub,false));
           privateKeyStorage.setKeyPairForKeyName(keyName, KeyType.RSA, pub, priv);
-
           scope.face.setCommandSigningInfo(keyChain, certificateName);
-
           keyAdded = true;
-
         }
 
         //Retrieval
         var retrievePrefix = new Name("/catalog/ui/" + guid());
-
-        scope.face.registerPrefix(retrievePrefix,
-        function(prefix, interest, face, interestFilterId, filter) {
+        scope.face.registerPrefix(retrievePrefix, function(prefix, interest, face, interestFilterId, filter) {
           //On Interest
           //This function will exist until the page exits but will likely only be used once.
-
           var data = new Data(interest.getName());
           var content;
           if (subset) {
@@ -712,8 +606,10 @@
           } else {
             content = JSON.stringify(names);
           }
+
           //Blob breaks the data! Don't use it
           data.setContent(content);
+
           //TODO Packetize this.
           keyChain.sign(data, certificateName);
 
@@ -725,7 +621,6 @@
             console.error("Failed to respond to", interest.getName().toUri(), data);
             scope.createAlert("Data retrieval failed.");
           }
-
         }, function(prefix) {
           //On fail
           scope.createAlert("Failed to register the retrieval URI! See console for details.", "alert-danger");
@@ -734,30 +629,21 @@
           //On success
           var name = new Name(dest.text());
           name.append(prefix);
-
-          scope.expressInterest(name,
-          function(interest, data) {
+          scope.expressInterest(name, function(interest, data) {
             //Success
             console.log("Request for", name.toUri(), "succeeded.", interest, data);
-          },
-          function() {
+          }, function() {
             console.warn("Failed to request from retrieve agent.");
-          }
-          );
-        }
-        );
-
+          });
+        });
       });
       $('#request').modal();
       //This forces the form to be the only option.
-
     }
-
   }();
 
   Atmos.prototype.filterSetup = function() {
     //Filter setup
-
     var prefix = new Name(this.catalog).append("filters-initialization");
 
     var scope = this;
@@ -766,19 +652,19 @@
       //Success
       var raw = JSON.parse(data.replace(/[\n\0]/g, ''));
       //Remove null byte and parse
-
       console.log("Filter categories:", raw);
 
       $.each(raw, function(index, object) {
         //Unpack list of objects
+
         $.each(object, function(category, searchOptions) {
           //Unpack category from object (We don't know what it is called)
           //Create the category
           var e = $('<li><a href="#">' + category.replace(/_/g, " ") + '</a><ul class="subnav nav nav-pills nav-stacked"></ul></li>');
-
           var sub = e.find('ul.subnav');
           $.each(searchOptions, function(index, name) {
             //Create the filter list inside the category
+
             var item = $('<li><a href="#">' + name + '</a></li>');
             sub.append(item);
             item.click(function() {
@@ -792,19 +678,15 @@
                 item.addClass('active');
                 var filter = $('<span class="label label-default"></span>');
                 filter.text(category + ':' + name);
-
                 scope.filters.append(filter);
-
                 filter.click(function() {
                   //Click on a filter
                   filter.remove();
                   item.removeClass('active');
                 });
               }
-
             });
           });
-
           //Toggle the menus. (Only respond when the immediate tab is clicked.)
           e.find('> a').click(function() {
             scope.categories.find('.subnav').slideUp();
@@ -817,19 +699,15 @@
               //Make it visible and look at it.
             }
           });
-
           scope.categories.append(e);
-
         });
       });
-
     }, function(interest) {
       //Timeout
       scope.createAlert("Failed to initialize the filters!", "alert-danger");
       console.error("Failed to initialize filters!", interest);
       ga('send', 'event', 'error', 'filters');
     });
-
   }
 
   /**
@@ -842,41 +720,30 @@
    * @param stop {boolean} stop if no finalBlock.
    */
   Atmos.prototype.getAll = function(prefix, callback, failure, stop) {
-
     var scope = this;
     var d = [];
-
     var name = new Name(prefix);
     var segment = 0;
-
     var request = function() {
-
       var n2 = new Name(name);
       n2.appendSegment(segment);
-
-      scope.expressInterest(n2, handleData, function(err, interest){failure(interest)});
+      scope.expressInterest(n2, handleData, function(err, interest) {
+        failure(interest)
+      });
       //Forward to handleData and ignore error
     }
-
     var handleData = function(interest, data) {
-
       d.push(data.getContent().toString());
-
       var hasFinalBlock = data.getMetaInfo().getFinalBlockId().value.length === 0;
       var finalBlockStop = hasFinalBlock && stop;
-
-      if (finalBlockStop ||
-      (!hasFinalBlock && interest.getName().get(-1).toSegment() == data.getMetaInfo().getFinalBlockId().toSegment())) {
+      if (finalBlockStop || (!hasFinalBlock && interest.getName().get(-1).toSegment() == data.getMetaInfo().getFinalBlockId().toSegment())) {
         callback(d.join(""));
       } else {
         segment++;
         request();
       }
-
     }
-
     request();
-
   }
 
   Atmos.prototype.cleanRequestForm = function() {
@@ -889,32 +756,26 @@
   }
 
   Atmos.prototype.setupRequestForm = function() {
-
     var scope = this;
-
     this.requestForm.find('#requestCancel').click(function() {
       $('#request').unbind('submit')//Removes all event handlers.
       .modal('hide');
       //Hides the form.
       scope.cleanRequestForm();
     });
-
     var dests = $(this.config['retrieval']['destinations'].reduce(function(prev, current) {
       prev.push('<li><a href="#">');
       prev.push(current);
       prev.push("</a></li>");
       return prev;
     }, []).join(""));
-
-    this.requestForm.find('#requestDest').append(dests)
-    .on('click', 'a', function(e) {
+    this.requestForm.find('#requestDest').append(dests).on('click', 'a', function(e) {
       $('#requestDest .active').removeClass('active');
       var t = $(this);
       t.parent().addClass('active');
       $('#requestDropText').text(t.text());
       $('#requestDest').prev().removeClass('btn-default').addClass('btn-success');
     });
-
     var addVariable = function(selector) {
       var ele = $(selector).clone().attr('id', '');
       ele.find('.close').click(function() {
@@ -922,7 +783,6 @@
       });
       $('#subsetVariables').append(ele);
     }
-
     $('#subsetAddVariableBtn').click(function() {
       addVariable('#customTemplate');
     });
@@ -932,29 +792,21 @@
     $('#subsetAddLocVariable').click(function() {
       addVariable('#locationTemplate');
     });
-
   }
 
   Atmos.prototype.getMetaData = (function() {
-
     var cache = {};
-
     return function(element) {
       var name = $(element).text();
-
       ga('send', 'event', 'request', 'metaData');
-
       var subsetButton = '<button class="btn btn-default subsetButton" type="button">Subset</button>';
-
       if (cache[name]) {
         return [subsetButton, '<pre class="metaData">', cache[name], '</pre>'].join('');
       }
-
       var prefix = new Name(name).append("metadata");
       var id = guid();
       //We need an id because the return MUST be a string.
       var ret = '<div id="' + id + '"><span class="fa fa-spinner fa-spin"></span></div>';
-
       this.getAll(prefix, function(data) {
         var el = $('<pre class="metaData"></pre>');
         el.text(data);
@@ -967,9 +819,7 @@
         $('#' + id).text("The metadata is unavailable for this name.");
         console.log("Data is unavailable for " + name);
       });
-
       return ret;
-
     }
   })();
 
diff --git a/client/catalog-dev/js/treeExplorer.js b/client/catalog/js/treeExplorer.js
similarity index 100%
rename from client/catalog-dev/js/treeExplorer.js
rename to client/catalog/js/treeExplorer.js
diff --git a/client/catalog-dev/variables.less b/client/catalog/variables.less
similarity index 100%
rename from client/catalog-dev/variables.less
rename to client/catalog/variables.less
diff --git a/client/gulpfile.js b/client/gulpfile.js
deleted file mode 100644
index 585a791..0000000
--- a/client/gulpfile.js
+++ /dev/null
@@ -1,69 +0,0 @@
-//Includes
-var gulp = require('gulp');
-var minifyHTML = require('gulp-minify-html');
-var minifyCSS = require('gulp-minify-css');
-var sourcemaps = require('gulp-sourcemaps');
-var closure = require('gulp-closure-compiler-service');
-var clean = require('gulp-clean');
-
-//Globs
-var cssGlob  = ['./catalog-dev/css/style.css', './catalog-dev/css/cubeLoader.css'];
-var jsGlob   = './catalog-dev/js/*.js';
-var htmlGlob = './catalog-dev/index.html';
-
-gulp.task('minify-html', function() {
-
-  return gulp.src(htmlGlob)
-    .pipe(minifyHTML())
-    .pipe(gulp.dest('./catalog/'));
-
-});
-
-gulp.task('minify-js', function() {
-
-  return gulp.src(jsGlob, {base: 'catalog-dev'})
-    .pipe(sourcemaps.init())
-    .pipe(closure())
-    .pipe(sourcemaps.write({sourceRoot: '/catalog-dev', includeContent: false}))
-    .pipe(gulp.dest('./catalog'));
-
-});
-
-gulp.task('minify-css', function() {
-
-  return gulp.src(cssGlob, {base: 'catalog-dev'})
-    .pipe(sourcemaps.init())
-    .pipe(minifyCSS())
-    .pipe(sourcemaps.write({sourceRoot: '/catalog-dev', includeContent: false}))
-    .pipe(gulp.dest('./catalog'));
-
-});
-
-gulp.task('copy', function() {
-
-  gulp.src('./catalog-dev/config.json')
-    .pipe(gulp.dest('./catalog'));
-
-  gulp.src('./catalog-dev/css/*.min.css')
-    .pipe(gulp.dest('./catalog/css'));
-
-});
-
-gulp.task('clean', function(){
-
-  return gulp.src('./catalog', {read: false})
-    .pipe(clean());
-
-});
-
-gulp.task('watch', ['default'], function(){
-
-  gulp.watch(cssGlob, ['minify-css']);
-  gulp.watch(jsGlob, ['minify-js']);
-  gulp.watch(htmlGlob, ['minify-html']);
-  gulp.watch(['./catalog-dev/config.json', './catalog-dev/css/*.min.css'], ['copy']);
-
-});
-
-gulp.task('default', ['minify-html', 'minify-css', 'minify-js', 'copy']);
-
diff --git a/client/package.json b/client/package.json
deleted file mode 100644
index dd76077..0000000
--- a/client/package.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
-  "name": "ndn-atmos",
-  "description": "A frontend for the ndn-atmos project",
-  "version": "2.1.0",
-  "license": "MIT",
-  "author": {
-    "name": "Tyler Scott",
-    "email": "tyduptyler13@gmail.com",
-    "url": "myuplay.com"
-  },
-  "contributors": [],
-  "scripts": {
-    "build": "gulp",
-    "host": "http-server -c-1 -p 5555 -a ::1; x-www-browser http://localhost:5555/catalog"
-  },
-  "devDependencies": {
-    "gulp": "^3.9.0",
-    "gulp-clean": "^0.3.1",
-    "gulp-closure-compiler-service": "^0.5.0",
-    "gulp-minify-css": "^1.2.1",
-    "gulp-minify-html": "^1.0.4",
-    "gulp-sourcemaps": "^1.5.2",
-    "http-server": "^0.8.0"
-  }
-}
