Simple pagination added. Needs revision.