Client pagination

See the last 2 commits. This contains all the other outstanding pull requests.