Implement pagination and a lot of other things