Issue #8: Improved documentation, error handling and code analysis issues.