diff --git a/web/js/controller-status.js b/web/js/controller-status.js
index fa887e3..5c1ae30 100644
--- a/web/js/controller-status.js
+++ b/web/js/controller-status.js
@@ -32,7 +32,7 @@
 	    },
 	    dataType: "json"
         });
-    }, 5000); 
+    }, 3000); 
 
     function draw(json){
 //	var data = json.data;
diff --git a/web/js/onos-topology.js b/web/js/onos-topology.js
index cea8f1a..3772127 100644
--- a/web/js/onos-topology.js
+++ b/web/js/onos-topology.js
@@ -257,12 +257,26 @@
 	    .text(function(d) { return d.name; });
 
 	circle.attr("fill", function(d) {
-	    if (d.group == 1){return "red";}
-	    else if (d.group == 2){return "blue";}
-	    else if (d.group == 3){return "green";}
-	    else if (d.group == 4){return "orange";}
-	    else if (d.group == 1000){return "black";}
-	    else{ return "gray"; }
+               if (d.group == 1){
+                    return "red"
+                }else if (d.group == 2){
+                    return "blue"
+                }else if (d.group == 3){
+                    return "green"
+                }else if (d.group == 4){
+                    return "orange"
+                }else if (d.group == 5){
+                    return "cyan"
+                }else if (d.group == 6){
+                    return "magenta"
+                }else if (d.group == 7){
+                    return "yellow"
+                }else if (d.group == 8){
+                    return "purple"
+                }else{
+                    return "gray"
+                }
+
 	});
 
 	path.attr("stroke", function(d) {
@@ -364,12 +378,25 @@
 	})
 
 	circle.attr("fill", function(d) {
-	    ;	    if (d.group == 1){return "red";}
-	    else if (d.group == 2){return "blue";}
-	    else if (d.group == 3){return "green";}
-	    else if (d.group == 4){return "orange";}
-	    else if (d.group == 1000){return "black";}
-	    else{ return "gray"; }
+                if (d.group == 1){
+                    return "red"
+                }else if (d.group == 2){
+                    return "blue"
+                }else if (d.group == 3){
+                    return "green"
+                }else if (d.group == 4){
+                    return "orange"
+                }else if (d.group == 5){
+                    return "cyan"
+                }else if (d.group == 6){
+                    return "magenta"
+                }else if (d.group == 7){
+                    return "yellow"
+                }else if (d.group == 8){
+                    return "purple"
+                }else{
+                    return "gray"
+                }
 	});
 //	text.attr("x", function(d) { return d.x; }).attr("y", function(d) { return d.y; });
 	text.attr("transform", function(d) {
diff --git a/web/topology_rest.py b/web/topology_rest.py
index 105c141..cdfdf24 100755
--- a/web/topology_rest.py
+++ b/web/topology_rest.py
@@ -14,7 +14,8 @@
 RestIP="localhost"
 RestPort=8080
 #DBName="onos-network-map"
-controllers=["onosgui1", "onosgui2", "onosgui3", "onosgui4"]
+#controllers=["onosgui1", "onosgui2", "onosgui3", "onosgui4"]
+controllers=["onosgui1", "onosgui2", "onosgui3", "onosgui4", "onosgui5", "onosgui6", "onosgui7", "onosgui8"]
 
 DEBUG=1
 pp = pprint.PrettyPrinter(indent=4)
@@ -41,6 +42,11 @@
 @app.route('/', methods=['GET'])
 @app.route('/<filename>', methods=['GET'])
 @app.route('/tpl/<filename>', methods=['GET'])
+@app.route('/ons-demo/<filename>', methods=['GET'])
+@app.route('/ons-demo/js/<filename>', methods=['GET'])
+@app.route('/ons-demo/css/<filename>', methods=['GET'])
+@app.route('/ons-demo/assets/<filename>', methods=['GET'])
+@app.route('/ons-demo/data/<filename>', methods=['GET'])
 def return_file(filename="index.html"):
   if request.path == "/":
     fullpath = "./index.html"
@@ -61,35 +67,100 @@
 
   return response
 
-init_topo1 = { 
-  "nodes" : [ 
-    {"name" : "sw0", "group" : 0},
-    {"name" : "sw1", "group" : 0},
-    {"name" : "sw2", "group" : 0},
-    {"name" : "sw3", "group" : 0},
-    {"name" : "sw4", "group" : 0},
-    {"name" : "sw5", "group" : 0},
-    {"name" : "host0", "group" : 1}
-    ],
-  "links" : [
-    {"source" :0, "target": 1},
-    {"source" :1, "target": 0},
-    {"source" :0, "target": 2},
-    {"source" :2, "target": 0},
-    {"source" :1, "target": 3},
-    {"source" :3, "target": 1},
-    {"source" :2, "target": 3},
-    {"source" :3, "target": 2},
-    {"source" :2, "target": 4},
-    {"source" :4, "target": 2},
-    {"source" :3, "target": 5},
-    {"source" :5, "target": 3},
-    {"source" :4, "target": 5},
-    {"source" :5, "target": 4},
-    {"source" :6, "target": 0},
-    {"source" :0, "target": 6}
-    ]
-}
+## PROXY API (allows development where the webui is served from someplace other than the controller)##
+ONOS_GUI3_HOST="http://gui3.onlab.us:8080"
+ONOS_LOCAL_HOST="http://localhost:8080" ;# for Amazon EC2
+
+@app.route("/wm/core/topology/switches/all/json")
+def switches():
+  if request.args.get('proxy') == None:
+    host = ONOS_LOCAL_HOST
+  else:
+    host = ONOS_GUI3_HOST
+
+  try:
+    command = "curl -s %s/wm/core/topology/switches/all/json" % (host)
+    print command
+    result = os.popen(command).read()
+  except:
+    print "REST IF has issue"
+    exit
+
+  resp = Response(result, status=200, mimetype='application/json')
+  return resp
+
+@app.route("/wm/core/topology/links/json")
+def links():
+  if request.args.get('proxy') == None:
+    host = ONOS_LOCAL_HOST
+  else:
+    host = ONOS_GUI3_HOST
+
+  try:
+    command = "curl -s %s/wm/core/topology/links/json" % (host)
+    print command
+    result = os.popen(command).read()
+  except:
+    print "REST IF has issue"
+    exit
+
+  resp = Response(result, status=200, mimetype='application/json')
+  return resp
+
+@app.route("/wm/flow/getall/json")
+def flows():
+  if request.args.get('proxy') == None:
+    host = ONOS_LOCAL_HOST
+  else:
+    host = ONOS_GUI3_HOST
+
+  try:
+    command = "curl -s %s/wm/flow/getall/json" % (host)
+    print command
+    result = os.popen(command).read()
+  except:
+    print "REST IF has issue"
+    exit
+
+  resp = Response(result, status=200, mimetype='application/json')
+  return resp
+
+@app.route("/wm/registry/controllers/json")
+def registry_controllers():
+  if request.args.get('proxy') == None:
+    host = ONOS_LOCAL_HOST
+  else:
+    host = ONOS_GUI3_HOST
+
+  try:
+    command = "curl -s %s/wm/registry/controllers/json" % (host)
+    print command
+    result = os.popen(command).read()
+  except:
+    print "REST IF has issue"
+    exit
+
+  resp = Response(result, status=200, mimetype='application/json')
+  return resp
+
+@app.route("/wm/registry/switches/json")
+def registry_switches():
+  if request.args.get('proxy') == None:
+    host = ONOS_LOCAL_HOST
+  else:
+    host = ONOS_GUI3_HOST
+
+  try:
+    command = "curl -s %s/wm/registry/switches/json" % (host)
+    print command
+    result = os.popen(command).read()
+  except:
+    print "REST IF has issue"
+    exit
+
+  resp = Response(result, status=200, mimetype='application/json')
+  return resp
+
 
 def node_id(switch_array, dpid):
   id = -1
@@ -100,6 +171,7 @@
 
   return id
 
+## API for ON.Lab local GUI ##
 @app.route('/topology', methods=['GET'])
 def topology_for_gui():
   try:
@@ -125,15 +197,6 @@
       sw['name']=dpid
       sw['group']= -1
 
-#      if state == "ACTIVE":
-#        if dpid.split(":")[5] == "0a":
-#          sw['group']=1
-#        if dpid.split(":")[5] == "0b":
-#          sw['group']=2
-#        if dpid.split(":")[5] == "0c":
-#          sw['group']=3
-#        if dpid.split(":")[5] == "0d":
-#          sw['group']=4
       if state == "INACTIVE":
         sw['group']=0
       switches.append(sw)
@@ -408,7 +471,6 @@
 
 #{"entityClass":"DefaultEntityClass","mac":["7c:d1:c3:e0:8c:a3"],"ipv4":["192.168.2.102","10.1.10.35"],"vlan":[],"attachmentPoint":[{"port":13,"switchDPID":"00:01:00:12:e2:78:32:44","errorStatus":null}],"lastSeen":1357333593496}
 
-
 ## return fake stat for now
 @app.route("/wm/core/switch/<switchId>/<statType>/json")
 def switch_stat(switchId, statType):
@@ -571,8 +633,6 @@
   pp.pprint(js)
   return resp
 
-
-
 if __name__ == "__main__":
   if len(sys.argv) > 1 and sys.argv[1] == "-d":
     print "-- query all switches --"
