Filehash tests & refactor.