Improved toString, equals and hashCode methods.