Cleaned up handling of "next" and "previous" objects

paginate.next and paginate.previous now return false if no next or
previous pages exist