(doc) Updated documentation.
(cleanup) Better error handling and reporting.