Slight refactoring of how the digest is made