More equals, hashcode and some other fixes
Bugfixes with hashcode, changed to IdentityHashMap instead of Hashmap