Create toString, equals, and hashCode for types