Cleaning up tree