Updated tests for the new API app which replaces batch. Also, corrected ...

...some PEP-8 issues and error handling