Utf8 support for the encrypted messages (cleanup)

Made everything one just commit, fixed things pointed out in the previous pull request.