     context = {}
 
     # Storage for the functions provided by the user.
-    ws_handlers = {}
+    ws_handlers = []
     helpers = {}
 
     apply_helpers = (ctx) ->

        context.share '__local', context.socket, (data) ->
          context.key = data.key

      for name, h of ws_handlers
        do (name, h) ->
          context.socket.on name, (data) ->
            ctx =
              app: app
              socket: context.socket


            apply_helpers ctx

            action.apply ctx

    $(-> app.run '#/') if app?

