Added some equals and hashcode + test.