Updated pagination and sorting