clean up tree builder