Added support for templates again