added error messages to unit tests and added remove method to api