Add support for template overriding