Add output for trees
Nodes and terminators are now stored as function objects

This allows the tree factory to re-use nodes
Added eval to Tree