Pagination fully tested, passed, and refactored