Split templates into headers and footers, and use different templates for each version