Refactor getUnreadHashes to the helper class