Added strong typing for equals, interface for equals, hashcode, some tests