     @stateful = @stateAttributes if @stateAttributes?
 
     return unless @stateful?
-    
+
     statefulView = @
 
     if _.isObject(@stateful) and not @defaultState?
-      @defaultState = @stateful 
+      @defaultState = @stateful
 
     @state ||= new Luca.ViewState(@defaultState || {})
 


    for key, value of @state.toJSON()
      hook = "on" + _.str.capitalize(key) + "Change"
      getter = "get" + _.str.capitalize(key) 
      unless _.isFunction(@[getter])
        1
      if _.isFunction(@[hook])

  __setupModelBindings: (direction="on")->
    statefulView = @
    for attribute, handler of @stateChangeEvents
      fn = if _.isString(handler) then statefulView[handler] else handler

      if attribute is "*"
        statefulView[direction]("state:change", fn, statefulView)
      else
