Add an API class and also add some testing for it.