Refactor testing & add new tests
Add pagination