Added support for compiled templates