about to break stuff
wip
optimized tree visitor. tests pass.
no obvious ineffiencies left
improved efficiency