Cleaning up the pagination