   # TODO: check for memory leaks
   removeViews: ->
     views = @_views()
-    for key,el of @.views
+    for key,el of views
       el.undelegateEvents()
       el.unbind()
       el.removeViews() if el.removeViews?

        0
    return plugsSort

view = require("../bone/view")

# pluginator mixin
# handles + order plugins
# gives a view a hierarchical / nested layout
# a view must have a `render` method
pluginator = view.extend

  # mix & shake
  #mixin: (view) ->

  # The region is no longer usable after being removed.
  remove: ->
    @removeViews()
    viewType::remove.apply @

  _views : ->
    @.views = {} unless @.views?
