Move error handling up a level, and handle decrypting non-encrypted text
Merge branch 'dev'