Partially implemented pagination.