Fix warnings, improved error handling, improve test coverage.