Add a MicroAPI exception class

Allow for better unit testing in future
Changes/documentation for database wrapper