First pass at handling pagination.