Various improvements to page setup handling.