Removed some chaos in the implementation of the paginator interface to make it easier to implement the iterator interface