Factored out tree stuff
Cleanup after merging new tree program