Refactor pagination code into PaginationInfo