Pagination and API Refactoring