This seems like a reasonable trade-off between speed of retrieving one page and number of pages needed to see lots of results. Many specific searches will return fewer results than this anyway.
There are only a few minor code changes, and nothing that should have an effect on functionality. This is basically just rearranging the code.