Pagination fix

Some stuff could be a little cleaner still (test architecture, url building logic), but pagination should be a go!