Refactorize Hashing module