A number of functions for creating trees, including the Node class. Also contains the tree optimiser class which can remove nodes which are never executed, or replace unnecessary computation with ERCs.