Cleaned up decryption, added some error messages.