Better presentation of errors to users via progress output.

Misc code tidying and documentation.