Leaner version of header/footer handling.