Rework enums
Merge branch 'master' into c