Pagination and sorting implemented