Move name hashing functions into a file of its own