Tidied Caesar and affine ciphers