Added hashing and ancillary functions.