* some code beauty fixes
* The error messages were misleading. Fixed.