Universal hash functions are refactored to classes.