Enumerations and Json serialization improved