Improvements to hashing