Changed compareTo, equals and hashCode of structures