Code restructuring of tree and parsing logic
* Enabled tree to generate itself
** Main work is now done during tree construction
* Moved lexer and getPriority utility functions into separate compilation unit