Refactoring/fixing around file hashes