Updated the page repository to not use the page factory direclty