SET: Improve error messages and coding style.