It feels like some of these methods could be consolidated into a tree visitor? Not sure it would pay off, just a thought.