Simplify the design of the TreeEvaluator class.