Tidy up the code and comments of hash::_build