Updated api code
Updated APIConnector tests