Various fixes to code and test code as a result of manual and automated testing (after the creation of the REST API).