Refactor new template as well