Added an equals() and the hashcode() it needs.