Improve hashing algorithm.