Added some equal() and hashcode() methods.