Implemented pagination. Close #7.