Added exceptions_app so errors return content based on the Accept header.
work done on fixing up library API. Still some bugs.