 
   get: -> format(@model, @ast.value, @ast.bound)
 
-class TextNode
-  constructor: (@ast, @model, @controller) ->
-    @textNode = Serenade.document.createTextNode(@get())
-    if @ast.bound
-      model.bind? "change:#{@ast.value}", =>
-        @textNode.nodeValue = @get()
-
-  append: (inside) ->
-    inside.appendChild(@textNode)
-
-  insertAfter: (after) ->
-    after.parentNode.insertBefore(@textNode, after.nextSibling)
-
-  remove: ->
-    @textNode.parentNode.removeChild(@textNode)
-
-  lastElement: ->
-    @textNode
-
-  get: ->
-    value = format(@model, @ast.value, @ast.bound)
-    value = "0" if value is 0
-    value or ""
-
 class If
   constructor: (@ast, @model, @controller) ->
     @anchor = Serenade.document.createTextNode('')

    context = { render, model, controller }
    element = helperFunction.apply(context, ast.arguments)
    new Node(ast, element, model, controller)

  constructor: (@ast, @element, @model, @controller) ->


  compile: (ast, model, controller) ->
    switch ast.type
      when 'element' then Node.element(ast, model, controller)
      when 'text' then new Node.text(ast, model, controller)
      when 'instruction'
        switch ast.command
          when "view" then new Node.view(ast, model, controller)
