Assorted code-gen improvements.

With these, we now get a CORE.setting.class generated.