changing templates to put headers and footers in one place