Added support for template IDs