Improved documentation/error messages