Splitting index into header and footer.