Move hash to utils, cleanup, add groundwork for friendship.
Resolve merge conflict.