Change parent hashing algorithm to be non-recursive and elaborate
greatly on many comments in the code.