keep all enum constants, and unsafe idxToEnum; minor cleanup