diff --git a/client/query/query.js b/client/query/query.js
index 6e41e67..efca0dd 100644
--- a/client/query/query.js
+++ b/client/query/query.js
@@ -1,26 +1,14 @@
-//{@ @todo: this need to be configured before the document load
 var catalog = "/catalog/myUniqueName";
 var config = {
   host: "atmos-csu.research-lan.colostate.edu",
   port: 9696
 };
 
-// @}
-
-var atmos = {}; //Comment this out if you don't want debug access.
-
 //Run when the document loads.
 $(function () {
-  
-  //remove "atmos =" if you don't want debug access
-  atmos = new Atmos(catalog, config);
-  
+  new Atmos(catalog, config);
 });
 
-/*
-  
-*/
-
 /**
  * Atmos
  * @version 2.0
@@ -112,7 +100,7 @@
   var payloadStr = data.content.toString().split("\n")[0];
 
   if (!payloadStr || payloadStr.length === 0){
-    this.populateResults(0);
+    this.populateResults();
     return; //No results were returned.
   }
 
@@ -120,32 +108,24 @@
 
   var scope = this;
 
-  //TODO Fix paging.
+  $.each(queryResults, function (queryResult, field) {
 
-  try {
+    if (queryResult == "next") {
+      scope.populateAutocomplete(field);
+    }
 
-    $.each(queryResults, function (queryResult, field) {
+    if (queryResult == "results" && field == null){
+      return; //Sometimes the results are null. (We should skip this.)
+    }
 
-      if (queryResult == "next") {
-        scope.populateAutocomplete(field);
-      }
-
-      if (queryResult == "results" && field == null){
-        return; //Sometimes the results are null. (We should skip this.)
-      }
-
-      $.each(field, function (entryCount, name) {
-        scope.results.push(name);
-      });
+    $.each(field, function (entryCount, name) {
+      scope.results.push(name);
     });
+  });
 
-    // Calculating the current page and the view
-    this.totalPages = Math.ceil(this.resultCount / 20);
-    this.populateResults(0);
+  // Calculating the current page and the view
+  this.populateResults();
 
-  } catch (e) {
-    console.error(e.message, e.stack);
-  }
 }
 
 Atmos.prototype.query = function(prefix, parameters, callback, pipeline) {
@@ -296,9 +276,11 @@
   }
 }
 
-Atmos.prototype.populateResults = function(startIndex) {
+Atmos.prototype.populateResults = function() {
+
+  //TODO Check only for page changes and result length
+
   this.resultTable.empty();
-  //this.resultTable.append('<tr><th colspan="2">Results</th></tr>');
 
   for (var i = startIndex; i < startIndex + 20 && i < this.results.length; ++i) {
     this.resultTable.append('<tr><td>' + this.results[i]
