Improved the way that pagination works.