Improved the generated code for Enum objects/data.

All 135 tests pass.