Improvements to the Pagenumber functionality