diff --git a/asterix-examples/src/main/resources/black-cherry/cherry.tpl b/asterix-examples/src/main/resources/black-cherry/cherry.tpl
index 015daf2..87fc2f5 100755
--- a/asterix-examples/src/main/resources/black-cherry/cherry.tpl
+++ b/asterix-examples/src/main/resources/black-cherry/cherry.tpl
@@ -84,27 +84,28 @@
           <p>Welcome to the top-level page of the mysteriously named Black Cherry Demo of AsterixDB.  The purpose of this demo is to illustrate how a "cool application" can be built using the JavaScript SDK of AsterixDB and to exercise all of the AsterixDB HTTP APIs.  If you are building an app of your own, reading the code for this app is a great way to get acquainted with what you'll need to know.</p>
 
           <p>In this demo, which is based on spatial analysis of Tweets (it is 2013, afterall), you will see how to formulate aggregate queries and drill-down queries using the query door of the AsterixDB API.  You will see how to do this either synchronously or asynchronously (for larger queries whose results may take a while to cook).  You will also see how to create and drop datasets (to manage Tweetbooks, notebooks with user commentary on Tweets) and how to perform inserts and deletes (to add/remove Tweetbook entries). Let's walk through the demo.</p>
+        </div>
+        
+        <hr/>
 
-          <hr/>
+        <!-- Tutorial Part 1: Overview -->
+        <div style="margin-bottom: 2em; text-align: center;">
+          <img src="static/img/Tutorial1.png" style="max-width:100%;">
+        </div><hr/>
 
-          <div style="margin-bottom: 2em; text-align: center;">
-            <img src="static/img/Tutorial1.png" style="max-width:100%;">
-          </div><hr/>
+        <!-- Tutorial Part 2: Location Search -->
+        <div style="margin-bottom: 2em; text-align: center;">
+          <img src="static/img/Tutorial2.png" style="max-width:100%;">
+        </div><hr/>
 
-          <!-- Tutorial Part 2: Location Search -->
-          <div style="margin-bottom: 2em; text-align: center;">
-            <img src="static/img/Tutorial2.png" style="max-width:100%;">
-          </div><hr/>
+        <!-- Tutorial Part 3: Search Results, Drilling Down, Saving Comments -->
+        <div style="margin-bottom: 2em; text-align: center;">
+          <img src="static/img/Tutorial3.png" style="max-width:100%;">
+        </div><hr/>
 
-          <!-- Tutorial Part 3: Search Results, Drilling Down, Saving Comments -->
-          <div style="margin-bottom: 2em; text-align: center;">
-            <img src="static/img/Tutorial3.png" style="max-width:100%;">
-          </div><hr/>
-
-          <!-- Tutorial Part 4: Review Mode -->
-          <div style="margin-bottom: 2em; text-align: center;">
-            <img src="static/img/Tutorial4.png" style="max-width:100%;">
-          </div>
+        <!-- Tutorial Part 4: Review Mode -->
+        <div style="margin-bottom: 2em; text-align: center;">
+          <img src="static/img/Tutorial4.png" style="max-width:100%;">
         </div> 
       </div>
     </div><!-- End About Tab -->
@@ -165,8 +166,7 @@
                   <!-- Submission Buttons -->
                   <li class="list-group-item">
                     <button class="btn btn-primary" type="button" id="submit-button">Submit</button>
-                    <button class="btn btn-primary" type="button" id="clear-button">Clear</button>
-                    <button class="btn btn-primary" type="button" id="show-query-button">Show Query</button><br/>
+                    <button class="btn btn-primary" type="button" id="clear-button">Clear</button><br/>
                     <input type="checkbox" value="Submit Asynchronously" name="async" id="asbox" />
                     Submit asynchronously?
                   </li>
diff --git a/asterix-examples/src/main/resources/black-cherry/run_black_cherry.py b/asterix-examples/src/main/resources/black-cherry/run_black_cherry.py
index d78514b..8616438 100755
--- a/asterix-examples/src/main/resources/black-cherry/run_black_cherry.py
+++ b/asterix-examples/src/main/resources/black-cherry/run_black_cherry.py
@@ -30,6 +30,8 @@
             chunk = urlresponse.read(CHUNK)
             if not chunk: break
             urlresult += chunk
+        
+        # QUERY ISSUE 2: UNCOMMENT THIS TO SEE WEIRD BUG    
         urlresult = ','.join(urlresult.split(']}{"results":['))
 
         # Create JSON dump of resulting response 
@@ -71,4 +73,4 @@
     return (build_response("update", dict(request.query)))
     
 res = black_cherry_bootstrap.bootstrap()
-run(host='localhost', port=8080, debug=True)
\ No newline at end of file
+run(host='localhost', port=8080, debug=True)
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 ac7e26c..3e5aa8d 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
@@ -85,6 +85,9 @@
     }
     
     var m = typeof mode ? mode : "synchronous";
+    
+    // DEBUG
+    //alert(statements.join("\n"));
      
     var query = "use dataverse " + this._properties["dataverse"] + ";\n" + statements.join("\n");
     
@@ -173,6 +176,9 @@
         statements = [ statements ];
     }
     
+    // DEBUG
+    // alert(statements.join("\n"));
+    
     this._api(
         {
             "statements" : "use dataverse " + this._properties["dataverse"] + ";\n" + statements.join("\n")
@@ -293,6 +299,8 @@
         
     } else {
     
+        // NOTE: This section is in progress; currently API requires 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])
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 898afb2..b63b676 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
@@ -62,7 +62,8 @@
         zoom: 4,
         mapTypeId: google.maps.MapTypeId.ROADMAP,
         streetViewControl: false,
-        draggable : false
+        draggable : false,
+        mapTypeControl: false
     };
     map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);
 
@@ -109,9 +110,6 @@
         rectangleManager.setDrawingMode(null);
     });
 
-    // Open about tab to start user on a tutorial
-    //$('#mode-tabs a:first').tab('show') // Select first tab
-
     // Initialize data structures
     APIqueryTracker = {};
     asyncQueryManager = {};
@@ -122,6 +120,12 @@
 
     getAllDataverseTweetbooks();
     initDemoUIButtonControls();
+    
+    google.maps.event.addListenerOnce(map, 'idle', function(){
+        // Show tutorial tab only the first time the map is loaded
+        $('#mode-tabs a:first').tab('show');
+    });
+    
 });
 
 function initDemoUIButtonControls() {
@@ -175,6 +179,8 @@
     $('#location-button').on('change', function (e) {
         $("#location-text-box").removeAttr("disabled");
         rectangleManager.setMap(null);
+        selectionRectangle = null;
+        rectangleManager.setDrawingMode(google.maps.drawing.OverlayType.RECTANGLE);
     });
     $("#selection-button").trigger("click");
 
@@ -195,7 +201,6 @@
         $("#report-message").html('');
         $("#submit-button").attr("disabled", true);
         rectangleManager.setDrawingMode(null);
-        $("body").css("cursor", "progress");
         
         var kwterm = $("#keyword-textbox").val();
         var startdp = $("#start-date").datepicker("getDate");
@@ -232,9 +237,6 @@
         var build_cherry_mode = "synchronous";
         if ($('#asbox').is(":checked")) {
             build_cherry_mode = "asynchronous";
-            //$('#show-query-button').attr("disabled", false);
-        } else {
-            //$('#show-query-button').attr("disabled", true);
         }
     
         var f = buildAQLQueryFromForm(formData);
@@ -243,9 +245,6 @@
             "query" : "use dataverse twitter;\n" + f.val(),
             "data" : formData
         };
-
-        // TODO Make dialog work correctly.
-        //$('#dialog').html(APIqueryTracker["query"]);
         
         if (build_cherry_mode == "synchronous") {
             A.query(f.val(), cherryQuerySyncCallback, build_cherry_mode);
@@ -419,7 +418,7 @@
     // Add to stored map of existing handles
     asyncQueryManager[handle_id] = {
         "handle" : handle,
-        "query" : handle_query,
+        "query" : handle_query, // This will show up when query control button is clicked.
         "data" : APIqueryTracker["data"]
     };
     
@@ -447,8 +446,6 @@
                 "query" : asyncQueryManager[handle_id]["query"],
                 "data"  : asyncQueryManager[handle_id]["data"]
             };
-            // TODO
-            //$('#dialog').html(APIqueryTracker["query"]);
         
             if (!asyncQueryManager[handle_id].hasOwnProperty("result")) {
                 // Generate new Asterix Core API Query
@@ -487,7 +484,6 @@
     
     $('#async_container_' + handle_id).append('<br/>');
     
-    $("body").css("cursor", "default");
     $("#submit-button").attr("disabled", false);
 }
 
@@ -497,6 +493,13 @@
 */
 function cherryQuerySyncCallback(res) {
     
+    // First, we check if any results came back in.
+    // If they didn't, return.
+    if (!res.hasOwnProperty("results")) {
+        reportUserMessage("Oops, no results found for those parameters.", false, "report-message");
+        return;
+    }
+    
     // Initialize coordinates and weights, to store
     // coordinates of map cells and their weights
     var coordinates = [];
@@ -599,8 +602,6 @@
         $("#legend-max").html(maxWeight);
         $("#rainbow-legend-container").show();   
     });
-    
-    $("body").css("cursor", "default");
 }
 
 /**
@@ -610,8 +611,6 @@
 */
 function onMapPointDrillDown(marker_borders) {
 
-    $("body").css("cursor", "progress");
-
     var zoneData = APIqueryTracker["data"];
     
     var zswBounds = new google.maps.LatLng(marker_borders.latSW, marker_borders.lngSW);
@@ -878,7 +877,7 @@
 function onPlotTweetbook(tweetbook) {
     
     // Clear map for this one
-    mapWidgetResetMap();
+    mapWidgetClearMap();
 
     var plotTweetQuery = new FLWOGRExpression()
         .ForClause("$t", new AExpression("dataset TweetMessagesShifted"))
@@ -907,6 +906,13 @@
 */
 function onTweetbookQuerySuccessPlot (res) {
 
+    // First, we check if any results came back in.
+    // If they didn't, return.
+    if (!res.hasOwnProperty("results")) {
+        reportUserMessage("Oops, no data matches this query.", false, "report-message");
+        return;
+    }
+
     // Parse out tweet Ids, texts, and locations
     var tweets = [];
     var al = 1;
@@ -956,8 +962,6 @@
         // Add marker to index of tweets
         map_tweet_markers.push(map_tweet_m); 
     });
-    
-    $("body").css("cursor", "default");
 }
 
 /**
@@ -1023,6 +1027,7 @@
         $('#review-well').show();
         mapWidgetResetMap();
         rectangleManager.setMap(null);
+        rectangleManager.setDrawingMode(null);
     });
 
     // Does some alignment necessary for the map canvas
