Properly generating enums