diff --git a/asterix-examples/src/main/resources/black-cherry/static/js/asterix-sdk-stable.js b/asterix-examples/src/main/resources/black-cherry/static/js/asterix-sdk-stable.js
index 6d63399..ac7e26c 100755
--- a/asterix-examples/src/main/resources/black-cherry/static/js/asterix-sdk-stable.js
+++ b/asterix-examples/src/main/resources/black-cherry/static/js/asterix-sdk-stable.js
@@ -286,28 +286,38 @@
                 if (data["status"] == 200 && data["responseText"] == "") {
                     success_fn(data);
                 } else {
-                    // TODO more graceful errors
                     alert("[Ajax Error]\n" + JSON.stringify(data));
                 }
             }
         });
+        
     } else {
-        alert("no jquery");
+    
+        // First, we encode the parameters of the query to create a new url.
+        api_endpoint = endpoint_url + "?" + Object.keys(json).map(function(k) {
+            return encodeURIComponent(k) + '=' + encodeURIComponent(json[k])
+        }).join('&');
+       
+        // Now, create an XMLHttp object to carry our request. We will call the
+        // UI callback function on ready.
         var xmlhttp;
+        xmlhttp = new XMLHttpRequest();
+        xmlhttp.open("GET", endpoint_url, true);
+        xmlhttp.send(null);
+        
+        xmlhttp.onreadystatechange = function(){
+            if (xmlhttp.readyState == 4) {
+                if (xmlhttp.status === 200) {
+                    alert(xmlhttp.responseText);
+                    //success.call(null, xmlHttp.responseText);
+                } else {
+                    //error.call(null, xmlHttp.responseText);
+                }
+            } else {
+                // Still processing
+            }
+        };
     }
-    // XML Http Request
-    /*var xmlhttp;
-    
-    xmlhttp = new XMLHttpRequest();
-    xmlhttp.onreadystatechange = function(){
-        if (xmlhttp.readyState == 4 && xmlhttp.status == 200){
-            alert(xmlhttp.responseText);
-            //callback(xmlhttp.responseText);
-        }
-    }
-    xmlhttp.open("GET", endpoint_url, true);
-    xmlhttp.send();*/
-    
     return this;
 };
 
@@ -679,8 +689,6 @@
 //
 // @param let_variable [String]
 // @param expression [AExpression]
-//
-// TODO Vigorous error checking
 function LetClause(let_variable, expression) {
     AQLClause.call(this);
     
diff --git a/asterix-examples/src/main/resources/black-cherry/static/js/cherry.js b/asterix-examples/src/main/resources/black-cherry/static/js/cherry.js
index 52ddadf..fb8ba0d 100755
--- a/asterix-examples/src/main/resources/black-cherry/static/js/cherry.js
+++ b/asterix-examples/src/main/resources/black-cherry/static/js/cherry.js
@@ -180,13 +180,13 @@
     end_dp.val(dateOptions.defaultDate);
     
     // Explore Mode: Toggle Selection/Location Search
-    $('#selection-button').on('click', function (e) {
+    $('#selection-button').on('change', function (e) {
         $("#location-text-box").attr("disabled", "disabled");
         if (selectionRect) {
             selectionRect.setMap(map);
         }
     });
-    $('#location-button').on('click', function (e) {
+    $('#location-button').on('change', function (e) {
         $("#location-text-box").removeAttr("disabled");
         if (selectionRect) {
             selectionRect.setMap(null);
@@ -229,7 +229,9 @@
         var bounds;
         if ($('#selection-button').hasClass("active") && selectionRect) {
             bounds = selectionRect.getBounds();
+            alert("using rectangle");
         } else {
+            alert("Using map");
             bounds = map.getBounds();
         }
         
@@ -270,7 +272,6 @@
         // Clears selection rectangle on query execution, rather than waiting for another clear call.
         if (selectionRect) {
             selectionRect.setMap(null);
-            selectionRect = null;
         }
     });
 }
@@ -1081,7 +1082,6 @@
 
     if (selectionRect) {
         selectionRect.setMap(null);
-        selectionRect = null;
     }
     
     mapWidgetClearMap();
@@ -1183,4 +1183,4 @@
   var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
   var d = R * c;
   return d;
-};
\ No newline at end of file
+};
