Add comments, and tweak exception reporting.