Added equals, hashcode and toString where needed.