Refactoring: Change the page and repository definition order