Rewrite: removed enum indirection