WIP - enumeration type codegen
WIP - fixing up a bunch of bookkeeping for type codegen