#1158 Refactoring for retrieving pages