Refactored ApiConnector