Additional support for internal error reporting using event system
* Some prepping for preprocessor token handling
* Other minor fixes/changes