Move pagination to model package