Add TreePrinter class.