refactored Pagination, updated docs