header and footer cleanup