               socket.broadcast.to(room).emit.apply socket.broadcast, [k, v]
               socket.emit.apply socket, [k, v]
 
-      for name, helper of helpers
-        do (name, helper) ->
-          ctx[name] = ->
-            helper.apply(ctx, arguments)
+      apply_helpers ctx
       ctx
 
     ctx = build_ctx()

  context.include = (p) ->
    sub = if typeof p is 'string' then require path.join(context.root, p) else p
    sub.include.apply(context, [context])

  # Register a route with express.
  route = (r) ->

            # Just forward params to express.
            res.render.apply res, args

        apply_helpers ctx

        if app.settings['databag']
          data = {}
