Added API class
Added unit test for API