Refactor fhash

merge it to 0.4 branch