Added support for internal templates (predefined macros)