moved header/footer control to the front end