Cleaning up the header, index, and footer.