Continued refactoring, for decrypting.