Cleanup the tree before compile