Improved error messages somewhat.