           @element()
 
       # Sort nodes using comparator
-      sort: () ->
+      _sort: () ->
         @nodes.sort(@_compareNodes)
 
       # Walk all nodes in the tree.

          tree.compareNodes(a, b)
        for node in @nodes
          node.container = this
        @sort()

      empty: () -> @nodes.length == 0

      add: (node) ->
        @nodes.push(node)
        node.container = this
        @sort()
        @_rebuildElement()

      remove: (node) ->
        if node in @nodes

        else
          throw new Error('Node not in this container')

      refresh: () ->
        @_sort()
        @_rebuildElement()
          
      element: () ->
        @_element ||= @_buildElement()

