Add support for headers and footers