Move page-specific code to the page