Feature/hash merging

Let's continue the discussion about the code that I am changing in this issue/PR.

Takes over discussions from #8.