Paginate manually

Very simple amendments to manually manage pagination.