Tidy.

Rewrite generated code.