Added comments to hash function, log to final