diff --git a/asterix-app/src/main/resources/sdk/static/js/asterix-api-core.js b/asterix-app/src/main/resources/sdk/static/js/asterix-api-core.js
index 6e6fec6..69e6a6e 100644
--- a/asterix-app/src/main/resources/sdk/static/js/asterix-api-core.js
+++ b/asterix-app/src/main/resources/sdk/static/js/asterix-api-core.js
@@ -1,56 +1,114 @@
+// AsterixSDK 
+// Core Object for REST API communication
+// Handles callbacks to client applications, communication to REST API, and 
+// endpoint selection. Initializes an RPC consumer object.
+// 
+// Usage:
+// var a = new AsterixSDK();
 function AsterixSDK() {
     
-    // Local RPC Handler for REST API
+    // Asterix SDK request handler initialization
+    // TODO Depending on configuration, may need multiples of these...
     this.xhr = new easyXDM.Rpc({
         remote: "http://localhost:19101/sdk/static/client.html"
     }, {
         remote: {
             post: {}
         }
-    });
-}
+    })
+    
+    // Asterix SDK => send
+    // Posts a message containing an API endpoint, json data,
+    // and a UI callback function.
+    //
+    // @param handler [Asterix REST Controller], a handler object
+    // that provides REST request information. 
+    //
+    // Anticipated Usage:
+    //
+    // var a = AsterixSDK();
+    // var e = Expression;
+    // var h = AsterixRestController.bindExpression(e);
+    // a.send(h);
+    this.send = function(handler) {
+        var api = handler.onSend();
+        this.xhr.post(
+            api["endpoint"],
+            api["apiData"],
+            api["callback"]
+        );
+    };
 
-
-AsterixSDK.prototype.send = function(handler) {
-    var api = handler.onSend();
-    this.xhr.post(
-        api["endpoint"],
-        api["apiData"],
-        api["callback"]
-    );
-}
-
-
-/**
-* Asterix SDK / requestHandler
-*
-* Talks to 
-*/
-AsterixSDK.prototype.requestHandler = function() {
-    var rpc = new easyXDM.Rpc({}, {
-        local: {
-            post: {
-                method: function(url, data, fn, fnError){
-                    $.ajax({
-                        type : 'GET',
-                        url : url,
-                        data : data,
-                        dataType : "json",
-                        success : function(res) {
-                            fn(res);
-                        }
-                    });
+    // Asterix SDK => requestHandler
+    // Handlers remote requests to Asterix REST API
+    // using the easyXDM RPC protocol
+    // Usually should only be called by client side, could be overridden
+    // TODO Get rid of jQuery ajax notation in favor of xmlhttprequest pure js
+    this.requestHandler = function() {
+        var rpc = new easyXDM.Rpc({}, {
+            local: {
+                post: {
+                    method: function(url, data, fn, fnError){
+                        $.ajax({
+                            type : 'GET',
+                            url : url,
+                            data : data,
+                            dataType : "json",
+                            success : function(res) {
+                                fn(res);
+                            }
+                        });
+                    }
                 }
             }
-        }
-    });
+        });
+    }
 }
 
-
+// Asterix REST Controller
+//
 // Asterix REST Controller
 // Handles interactions with remote database using a request handler
 function AsterixRESTController() {
-    
+   
+    // bindExpression
+    // Prepares an expression for query the asterix API
+    // TODO: Future expressions will do some kind of parsing on queries, for now
+    // a keyword is used to return the appropriate handler
+    // keywords: ddl, update, query, query_status, query_result
+    //
+    // @param expression [AsterixExpression], an expression or one of its
+    // subclasses
+    // @param handler [AsterixRESTController], a handler to pass to the SDK
+    // remote method call
+    this.bindExpression = function(expression, handler_type) {
+        
+        // TODO Expression handler
+
+        // Parse handler, to be replaced with something more elegant
+        switch (handler_type)
+        {
+            case "ddl":
+                break;
+            case "update":
+                break;
+            case "query":
+                break;
+            case "query_status":
+                break;
+            case "query_result":
+                break;
+            default:
+                this.onHandlerInitError();
+        }
+    };
+
+    // onHandlerInitError
+    // Method for handling expression binding errors in the controller.
+    this.onHandlerInitError = function() {
+        alert("AsterixSDK / AsterixRESTController / bindExpressionError: Could not determine api endpoint, incorrect keyword");
+    }
+
     // REST DDL API
     this.DDL = function(data, callback) {
         this.endpoint = "http://localhost:19101/ddl";
@@ -117,17 +175,33 @@
 };
 
 
-// For expressions
-// TODO Is this correct name?
-// TODO Probably query API
-ForExpression.prototype = new AsterixExpression();
-ForExpression.prototype.constructor = ForExpression;
-function ForExpression() {}
-ForExpression.prototype.onSend = function () {
+// ForClause
+//
+// Grammar:
+// "for" Variable ( "at" Variable )? "in" ( Expression )
+//
+// @param for_variable [String], REQUIRED, first variable in clause 
+// @param at_variable [String], NOT REQUIRED, first variable in clause
+// @param expression [AsterixExpression], REQUIRED, expression to evaluate
+//
+// Doesn't need Expression syntax
+// ForExpression.prototype = new AsterixExpression();
+// ForExpression.prototype.constructor = ForExpression;
+function ForClause(for_variable, at_variable, expression) {
+    
+    // Parse for and expression
+    this.variable = for_variable;
+    this.expression = expression;
 
+    // at_variable is optional, check if defined
+    this.at = typeof at_variable ? a : null;
+
+    // TODO Error handling
+    this.toString = function() {
+     
+    };
 }
-
-// 
+ 
 
 /*
 // ************************
diff --git a/asterix-examples/src/main/resources/cherry/examples/cherry.html b/asterix-examples/src/main/resources/cherry/examples/cherry.html
index 8e37cfe..e8facae 100755
--- a/asterix-examples/src/main/resources/cherry/examples/cherry.html
+++ b/asterix-examples/src/main/resources/cherry/examples/cherry.html
@@ -8,7 +8,9 @@
         rel="stylesheet" type="text/css"/>
     <link href="../css/jquery.dataTables.css" rel="stylesheet" type="text/css"/>
     <link href="../css/bootstrap.min.css" rel="stylesheet" media="screen">
-    
+
+    <link rel="shortcut icon" type="image/png" href="../img/mobile.png">
+
     <script src="http://maps.googleapis.com/maps/api/js?sensor=false&libraries=places"
         type="text/javascript"></script> 
     <script src="http://code.jquery.com/jquery.min.js" type="text/javascript"></script>
