Fixed/Refactor hasher function