Remove unneeded equal and hashCode methods.