encryptor code cleanup