     # Any time there is a model change event on the internal state machine
     # we will trigger a general state:change event on the component as well
     # as individual state:change:attribute events
-    state = statefulView.state 
+    state = statefulView.state
     statefulView.state[direction]("change", Luca.concerns.StateModel.__onModelChange, statefulView)


stateModel = Luca.register("Luca.ViewState").extends("Luca.Model")

Luca.concerns.StateModel =
  __onModelChange: (args...)->

  __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
