LOOP: Improve error messages and coding style.