Documentation fixes, improved error handling.