cleanup, and pass more tree building tests