TreeGen Improvement