Mark bitfields as flags
Fixed sorting for enums and bitfields
Cleaned up enum