Implement local templates, to make testing easier