 require('zappa') ->
-  #set 'view engine': 'eco'
+  @get
+    '/': ->
+      @foo = 'bar'
+      @render 'index'
+      
+    '/eco': ->
+      @foo = 'bar'
+      @render 'index.eco'
+      
+    '/jade': ->
+      @foo = 'bar'
+      @render 'index.jade'
+
+  @view index: ->
+    h2 'CoffeeKup inline template'
+    p @foo
   
-  get
-    '/': -> render 'index'
-    '/eco': -> render 'index.eco'
-    '/jade': -> render 'index.jade'
-
-  ###
-  view index: ->
-    h2 'CoffeeKup inline template'
-  
-  view layout: ->
+  @view layout: ->
     doctype 5
     html ->
       head ->

      body ->
        h1 'CoffeeKup inline layout'
        @body
  ###
  
  view 'index.eco': '''
    <h2>Eco inline template</h2>
  '''
  
  view 'layout.eco': '''
    <!DOCTYPE html>
    <html>
      <head>

    </html>
  '''
  
  @view 'index.jade': '''
    h2 Jade inline template
    p= params.foo
  '''
  
  @view 'layout.jade': '''
    !!! 5
    html
      head
