         # Branch
         else if isBranch attrs
             node = new DataContextNode type: attrs.type
-            children = _.map attrs.children, (_attrs) -> DataContextNode.parseAttrs _attrs, node, callback
+            children = _.map attrs.children, (_attrs) ->
+                DataContextNode.parseAttrs _attrs, node, callback
             node.set children: children
         # Condition
         else if isCondition attrs


        if parent
            node.parent = parent
            delete node.root
        else
            node.root = true

        callback?(node)
        return node


    class DataContext extends Backbone.Model

                if cache.indexOf(node) is -1
                    cache.push node

        _deferenceNode: (node) =>
            if (cache = @nodes[node.id]) and (idx = cache.indexOf(node)) >= 0
                cache.splice(idx, 1)

        # Returns an array of nodes for the provided `id`.
        getNodes: (id) ->
            @nodes[id] or []

        # Promotes the given `node` to a branch
        promote: (node, nodes...) ->
            if node is null
                @node.promote nodes...
            else
                node.promote nodes...
            @save()

        demote: (node) ->
            node.demote()
            @save()

        add: (node, nodes...) ->
            # Attempt to add to the root node. If the root is empty, so
            # replace it with this node
            if not node
                if @node.isEmpty()
                    @node = nodes[0]
                    @_cacheNode @node
                else
                    node = @node
            if node
                node.add nodes...
                @_cacheNode node for node in node.get 'children'
            @save()

        remove: (node) ->
            node = node or @node
            node.remove()
            if not node.isRoot() then @_deferenceNode node
            @save()


    class DataContexts extends Backbone.Collection
