diff --git a/asterix-app/src/main/resources/sdk/static/example/demo.html b/asterix-app/src/main/resources/sdk/static/example/demo.html
index 4eaff8a..46fb89f 100644
--- a/asterix-app/src/main/resources/sdk/static/example/demo.html
+++ b/asterix-app/src/main/resources/sdk/static/example/demo.html
@@ -280,18 +280,20 @@
         </pre></div>
         
         <div class="how-to-run"><pre><code class="javascript">
-    var expression8 = new FunctionExpression({
-        "function"      : "count",
-        "expression"    : new ForClause(
-                              "fbu", null, new AsterixExpression().set(["dataset FacebookUsers"])
-                          ).bind(
-                            {"return" : new AsterixExpression().set(["$fbu"])}
-                          ),
-        "dataverse"     : "TinySocial",
-        "success"       : function(res) {
-                              $('#result8').html(res["results"]);
-                          }
-    });
+        var expression8 = new FunctionExpression(
+            "count",
+            new ForClause("fbu", null, new AQLClause().set("dataset FacebookUsers"))
+                .bind( new ReturnClause( new AQLClause().set("$fbu") ))
+        );
+        
+        OR
+        
+        var expression8 = new FunctionExpression()
+            .fn("count")
+            .expression(
+                new ForClause("fbu", null, new AQLClause().set("dataset FacebookUsers"))
+                    .bind( new ReturnClause( new AQLClause().set("$fbu") ))
+            );
         </code></pre></div>
 
         <div class="result-output" id="result8">
diff --git a/asterix-app/src/main/resources/sdk/static/example/js/demo.js b/asterix-app/src/main/resources/sdk/static/example/js/demo.js
index 0cca153..4724d25 100644
--- a/asterix-app/src/main/resources/sdk/static/example/js/demo.js
+++ b/asterix-app/src/main/resources/sdk/static/example/js/demo.js
@@ -4,7 +4,6 @@
     $('#run0a').click(function () {
         $('#result0a').html('');
         var expression0a = new FLWOGRExpression({
-            "dataverse" : "TinySocial",
             "success"   : function(res) {
                             $('#result0a').html(res["results"]);
                           } 
@@ -21,7 +20,6 @@
         $('#result0b').html('');
 
         var expression0b = new FLWOGRExpression({
-            "dataverse" : "TinySocial",
             "success"   : function(res) {
                               alert(JSON.stringify(res));
                               $('#result0b').html(res["results"]);
@@ -40,7 +38,6 @@
         $('#result1').html('');
 
         var expression1 = new FLWOGRExpression({
-            "dataverse" : "TinySocial",
             "success"   : function(res) {
                             alert(JSON.stringify(res));
                             $('#result1').html(res["results"]);
@@ -54,7 +51,6 @@
         $('#result2a').html('');
 
         var expression2a = new FLWOGRExpression({
-            "dataverse" : "TinySocial",
             "success"   : function(res) {
                             alert(JSON.stringify(res));
                             $('#result2a').html(res["results"]);
@@ -68,7 +64,6 @@
         $('#result2b').html('');
 
         var expression2b = new FLWOGRExpression({
-            "dataverse" : "TinySocial",
             "success"   : function(res) {
                             alert(JSON.stringify(res));
                             $('#result2b').html(res["results"]);
@@ -82,7 +77,6 @@
         $('#result3').html('');
 
         var expression3 = new FLWOGRExpression({
-            "dataverse" : "TinySocial",
             "success"   : function(res) {
                             alert(JSON.stringify(res));
                             $('#result3').html(res["results"]);
@@ -96,7 +90,6 @@
         $('#result4').html('');
 
         var expression4 = new FLWOGRExpression({
-            "dataverse" : "TinySocial",
             "success"   : function(res) {
                             alert(JSON.stringify(res));
                             $('#result4').html(res["results"]);
@@ -110,7 +103,6 @@
         $('#result5').html('');
 
         var expression5 = new FLWOGRExpression({
-            "dataverse" : "TinySocial",
             "success"   : function(res) {
                             alert(JSON.stringify(res));
                             $('#result5').html(res["results"]);
@@ -124,7 +116,6 @@
         $('#result6').html('');
 
         var expression6 = new FLWOGRExpression({
-            "dataverse" : "TinySocial",
             "success"   : function(res) {
                             alert(JSON.stringify(res));
                             $('#result6').html(res["results"]);
@@ -151,7 +142,6 @@
         $('#result7').html('');
 
         var expression7 = new FLWOGRExpression({
-            "dataverse" : "TinySocial",
             "success"   : function(res) {
                             alert(JSON.stringify(res));
                             $('#result7').html(res["results"]);
@@ -175,97 +165,73 @@
 
     // 8 - Simple Aggregation
     $('#run8').click(function () {
-
-        // Option 1: Simple, Object Syntax     
+    
         $('#result8').html('');   
-        var expression8 = new FunctionExpression({
-            "function"      : "count",
-            "expression"    : new ForClause("fbu", null, new AExpression().set("dataset FacebookUsers"))
-                                    .bind( new ReturnClause( new AExpression().set("$fbu") )),
-            "dataverse"     : "TinySocial",
-            "success"       : function(res) {
-                                $('#result8').html(res["results"]);
-                              }
-        });
-        alert(expression8.val());
-        // expression8.run();
+
+        // Version 1
+        var expression8 = new FunctionExpression(
+            "count",
+            new ForClause("fbu", null, new AQLClause().set("dataset FacebookUsers"))
+                .bind( new ReturnClause( new AQLClause().set("$fbu") ))
+        );
+        
+        var success8 = function(res) {
+            $('#result8').html(res["results"]);
+        };
+        expression8.run(success8);
     });
 
     // 9a - Grouping & Aggregation
     $("#run9a").click(function() {
         $('#result9a').html('');
 
-        var expression9a = new FLWOGRExpression({
-            "dataverse" : "TinySocial",
-            "success"   : function(res) {
-                            $('#result9a').html(res["results"]);
-                          }
-        })
-        .bind( new ForClause("t", null, new AExpression().set("dataset TweetMessages")))
-        .bind( new GroupClause("uid", new AExpression().set("$t.user.screen-name"), "with", "t") )
-        .bind( new ReturnClause(
-            {
-                "user" : "$uid",
-                "count" : new FunctionExpression(
-                            { 
-                                "function" : "count",
-                                "expression" : new AExpression().set("$t")
-                            }
-                )
-            }
-        ));
+        var expression9a = new FLWOGRExpression()
+            .bind( new ForClause("t", null, new AExpression().set("dataset TweetMessages")))
+            .bind( new GroupClause("uid", new AExpression().set("$t.user.screen-name"), "with", "t") )
+            .bind( new ReturnClause(
+                {
+                    "user" : "$uid",
+                    "count" : new FunctionExpression("count", new AExpression().set("$t"))
+                }
+            ));
 
-        expression9a.run();
+        var success9a = function(res) {
+            $('#result9a').html(res["results"]);
+        };
+        expression9a.run(success9a);
     });
 
     // 9b - Hash-based Grouping & Aggregation
     $("#run9b").click(function() {
         $('#result9b').html('');
 
-        var expression9b = new FLWOGRExpression({
-            "dataverse" : "TinySocial",
-            "success"   : function(res) {
-                            $('#result9b').html(res["results"]);
-                          }
-        })
-        .bind( new ForClause("t", null, new AExpression().set("dataset TweetMessages"))) 
-        .bind( new AQLClause().set("/*+ hash*/"))  
-        .bind( new GroupClause("uid", new AExpression().set("$t.user.screen-name"), "with", "t") )
-        .bind( new ReturnClause(
-            {
-                "user" : "$uid",
-                "count" : new FunctionExpression(
-                            { 
-                                "function" : "count",
-                                "expression" : new AExpression().set("$t")
-                            }
-                )
-            }
-        ));
+        var expression9b = new FLWOGRExpression()
+            .bind( new ForClause("t", null, new AExpression().set("dataset TweetMessages"))) 
+            .bind( new AQLClause().set("/*+ hash*/"))  
+            .bind( new GroupClause("uid", new AExpression().set("$t.user.screen-name"), "with", "t") )
+            .bind( new ReturnClause(
+                {
+                    "user" : "$uid",
+                    "count" : new FunctionExpression("count", new AExpression().set("$t"))
+                }
+            ));
         
-        expression9b.run();
+        var success9b = function(res) {
+            $('#result9b').html(res["results"]);
+        };
+        expression9b.run(success9b);
     });
     
     // 10 - Grouping and Limits
     $("#run10").click(function() {
         $('#result10').html('');
 
-        var expression10 = new FLWOGRExpression({
-            "dataverse" : "TinySocial",
-            "success"   : function(res) {
-                            $('#result10').html(res["results"]);
-                          }
-        })
+        var expression10 = new FLWOGRExpression()
         .bind( new ForClause("t", null, new AExpression().set("dataset TweetMessages")))
         .bind( new GroupClause("uid", new AExpression().set("$t.user.screen-name"), "with", "t") )
         .bind( new LetClause(
             "c", 
-            new FunctionExpression(
-                { 
-                    "function" : "count",
-                    "expression" : new AExpression().set("$t")
-                }
-            )
+            new FunctionExpression("count", new AExpression().set("$t"))
         ))
         .bind( new OrderbyClause( new AExpression().set("$c"), "desc" ) )
         .bind( new LimitClause(new AExpression().set("3")) )
@@ -276,7 +242,10 @@
             }
         ));
 
-        expression10.run();
+        var success10 = function(res) {
+            $('#result10').html(res["results"]);
+        };
+        expression10.run(success10);
     });
 
     // 11 - Left Outer Fuzzy Join
@@ -284,7 +253,6 @@
         $('#result11').html('');
 
         var expression11 = new FLWOGRExpression({
-            "dataverse" : "TinySocial",
             "success"   : function(res) {
                             $('#result11').html(res["results"]);
                           }
@@ -300,7 +268,10 @@
                                 .bind( new ReturnClause(new AQLClause().set("$t2.referred-topics")))
         })); 
         
-        expression11.run();
+        var success11 = function(res) {
+            $('#result11').html(res["results"]);
+        };
+        expression11.run(success11);
     });
 
     //$('#run0a').trigger('click');
@@ -313,7 +284,7 @@
     //$('#run5').trigger('click');
     //$('#run6').trigger('click');
     //$('#run7').trigger('click');
-    //$('#run8').trigger('click');
+    $('#run8').trigger('click');
     $('#run9a').trigger('click');
     $('#run9b').trigger('click');
     $('#run10').trigger('click');
diff --git a/asterix-app/src/main/resources/sdk/static/js/asterix-sdk-stable.js b/asterix-app/src/main/resources/sdk/static/js/asterix-sdk-stable.js
index 33b8e3c..1b4f754 100644
--- a/asterix-app/src/main/resources/sdk/static/js/asterix-sdk-stable.js
+++ b/asterix-app/src/main/resources/sdk/static/js/asterix-sdk-stable.js
@@ -10,10 +10,6 @@
 AExpression.prototype.bind = function(options) {
     var options = options || {};
 
-    if (options.hasOwnProperty("dataverse")) {
-        this._properties["dataverse"] = options["dataverse"];
-    }
-
     if (options.hasOwnProperty("success")) {
         this._success = options["success"];
     }
@@ -24,13 +20,13 @@
 };
 
 
-AExpression.prototype.run = function() {
-    var success_fn = this._success;
+AExpression.prototype.run = function(successFn) {
+    var success_fn = successFn;
 
     $.ajax({
         type : 'GET',
         url : "http://localhost:19002/query",
-        data : {"query" : this.val()},
+        data : {"query" : "use dataverse TinySocial;\n" + this.val()},
         dataType : "json",
         success : function(data) {     
             success_fn(data);
@@ -65,7 +61,7 @@
 
 
 AExpression.prototype.error = function(msg) {
-    return "Asterix FunctionExpression Error: " + msg;
+    //return "Asterix FunctionExpression Error: " + msg;
 };
 
 
@@ -74,14 +70,23 @@
 // 
 // @param   options [Various], 
 // @key     function [String], a function to be applid to the expression
-// @key     expression [AsterixExpression or AsterixClause] an AsterixExpression/Clause to which the fn will be applied
-function FunctionExpression(options) {
+// @key     expression [AsterixExpression or AQLClause] an AsterixExpression/Clause to which the fn will be applied
+function FunctionExpression() {
     
     // Initialize superclass
     AExpression.call(this);
+    
+    this._properties["function"] = "";
+    this._properties["expression"] = new AExpression().set("");
 
-    // Possible to initialize a function epxression without inputs, or with them
-    this.bind(options);
+    // Check for fn/expression input
+    if (arguments.length == 2 && typeof arguments[0] == "string" && 
+        (arguments[1] instanceof AExpression || arguments[1] instanceof AQLClause)) {
+     
+        this._properties["function"] = arguments[0];
+        this._properties["expression"] = arguments[1];
+        
+    } 
 
     // Return object
     return this;
@@ -92,23 +97,25 @@
 FunctionExpression.prototype.constructor = FunctionExpression;
 
 
-FunctionExpression.prototype.bind = function(options) {
+FunctionExpression.prototype.fn = function(fnName) {
 
-    AExpression.prototype.bind.call(this, options);
+    if (typeof fnName == "string") {
+        this._properties["function"] = fnName;
+    }
     
-    var options = options || {};
-
-    if (options.hasOwnProperty("function")) {
-        this._properties["function"] = options["function"];
-    }
-
-    if (options.hasOwnProperty("expression")) {
-        this._properties["expression"] = options["expression"];
-    }
-
     return this;
 };
 
+
+FunctionExpression.prototype.expression = function(expression) {
+    if (expression instanceof AExpression || expression instanceof AQLClause) {
+        this._properties["expression"] = expression;
+    }
+    
+    return this;
+};
+   
+
 FunctionExpression.prototype.val = function () { 
     return this._properties["function"] + "(" + this._properties["expression"].val() + ")";
 };
@@ -201,10 +208,9 @@
 };
 
 AQLClause.prototype.bind = function(options) {
-    var options = options || {};
 
-    if (options.hasOwnProperty("return")) {
-        this._properties["return"] = options["return"];
+    if (options instanceof AQLClause) {
+        this._properties["clause"] += " " + options.val();
     }
 
     return this;
@@ -386,6 +392,7 @@
 
     // At least one argument expression is required, and first should be expression
     if (arguments.length == 0 || !(arguments[0] instanceof AExpression)) {
+    
         // TODO Not sure which error to throw for an empty OrderBy but this should fail.
         alert("Order By Error");
         this._properties["clause"] = null;
