Adds pagination and moves configuration to an external file