Refactoring pageUrl implementation.