Added support for overriding templates