Alterd code somewhat, check cipherstrings and support different AES modes.