Better handling of enums and fields