Review and changes from Jocelyn Fiat

Great.
I already thought about this, because this factorization would allow us to easily add other hash functions, with minor efforts.