Added equals methods to classes.