Added toString, hashCode and equals methods.