Implement basic pagination handling.