Added unit tests for template compiler