Move API response handler into a private class
Work on fixing pagination