     all: {}
   }
   @_id_counter: 0
-  @view_name: '_default'
+  @view_name: '_default' # chould be snake_case version of Marbles.Views key (e.g. Marbles.Views.MainView should be main_view)
 
   @find: (cid) ->
     @instances.all[cid]

      else
        @el.innerHTML = html

    @el.view_cid = @cid

    @detachChildViews()


  bindViews: =>
    @_child_views ?= {}
    _.each Marbles.DOM.querySelectorAll('[data-view]', (@container?.el || @el)), (el) =>
      view_class_names = Marbles.DOM.attr(el, 'data-view').split(/\s+/)

      for view_class_name in view_class_names
        if viewClass = Marbles.Views[view_class_name]
          _init = false
          el.view_cids ?= {}
          unless (_view_cid = el.view_cids[view_class_name]) && (view = viewClass.instances.all[_view_cid])
            view = new viewClass el: el, parent_view: @
            _init = true
          @_child_views[view_class_name] ?= []
          @_child_views[view_class_name].push view.cid
          el.view_cids[view_class_name] = view.cid

          view.bindViews?()

          @trigger("init:#{view_class_name}", view) if _init
          @trigger("init-view", view_class_name, view) if _init
        else
          console.warn "Marbles.Views.#{view_class_name} is not defined!"

  detachChildViews: =>
    for class_name, cids of (@_child_views || {})
