Fixed a bug where retrieving a page of one object from a collection just returned the object, and not an array. Tidied other things as I went.