Api to manipulate a tree of nodes