Improve error messages.
Avoid use of deprecated/removed symbols.