Merge pagination and paging features

This PR merges the pagination and paging features, as discussed in #2106.