BAU-61. Change model of hashing and fix some structure issues.