Separated the printing of header and footer pages to private methods.
router index is completed.