Need to rewrite the tree
Starting to get the tree rewriting to work...