Unify error messages, reduce size; improvements

- improve error checking a bit
- unify most error and warning messages
- reduce the size of the error/warning messages to free up room for new
features