Alot of work on the tree structure