Refactor API Caller into multiple classes, add tests