Added pagination prototype, added to search for demonstration

Also fixed a bug in search where it was including results where the object_id was 0 (presumably this happens when an object is deleted?)