       point.treeId = @activeTree.treeId
       @trees[@activeTree.treeIndex] = point
       @activeTree = point
+      @activeTree.parent = null
     @activeNode = point
     @lastActiveNodeId = @activeNode.id
-    #console.log @activeTree.toString()
-    #console.log @getNodeList()
-    #for item in @getNodeList()
-    #  console.log item.id
 
   getActiveNodeId : ->
     @lastActiveNodeId

      if tree.treeId == id
        @activeTree = tree
        break
    @activeNode = @activeTree
    @lastActiveNodeId = @activeNode.id
    @push()

  createNewTree : ->

      @activeNode.remove(id)
      @lastActiveNodeId = @activeNode.id
    else
      # Root is deleted
      @deleteActiveTree()
    @push()

