       variable: (name, value) ->
         viewModel[name] = value
         viewModelNotify()
-
-      bind: (path, subTemplate) ->
-        if typeof path isnt 'string'
-          bindIndex path, subTemplate
-        else if path[0] is '@'
-          bindVariable path.substring(1), subTemplate
-        else
-          bindPath path.split('.'), subTemplate
 
       apply: (path) ->
         target = null

        method.call(target)

        modelNotify()

    if preInitMap
      viewInstance[n] = v for n, v of preInitMap

    viewInstance.__proto__ = viewPrototype

    template.call(viewInstance, model)

    undefined # prevent stray output

  runTemplate rootModel, {}, createNotifier(), Object.prototype, rootTemplate

          createGetter (-> v = parentGetter(); if typeof v isnt 'object' then undefined else v[element]), index + 1

      getter = createGetter (-> model), 0
      bindOnChange viewInstance, getter, modelNotify, subTemplate

    {
      bind: (path, subTemplate) ->
        if typeof path isnt 'string'
          bindIndex this, path, subTemplate
        else if path[0] is '@'
          bindVariable this, path.substring(1), subTemplate
        else
          bindPath this, path.split('.'), subTemplate

      get: () ->
        # @todo type-check for primitives for true immutability
