Simplified the prev/next pagination a bit