Implemented pagination which resolves #4