Added enums, equals and hashcode