Add pagination and clean up tests

Thanks lawson!
This was a clever solution, but yours is more readable I think. Changing