Refactored compiler class into sub-compilers, added support for template statements, which allows for extending templates