Simplify Pagination

The sample shows how to simplify pagination.