move all the final page construction to a construct_page() function