Work on equals, hashCode and toString

This PR contains some work on equals, hasCode and toString which I had changed locally but is not merged into folone repos yet