Pagination fixes

This pull request includes everything outlined #27