Extract hashing functions into module

So that we can better name them.
Add some more hashing functions