Cleaning up mgen-API to support enums