Added support for own templates