More work on TreeBuilder.java