Fixed some xml-hint issues.
[gh-26] Slightly improved event model.
Modified linker logic to avoid regenerating code from AST.
Misc performance optimizations.
[fixes gh-26] Improved error reporting, added promise polyfill.