Refactoring of API calls with ApiConnector