Added some useful functions to the parsetree module.