clean up and new tree transformer that can collect information while transforming.