Better encoding messages to bytes and decoding back to messages. Should
work now on larger messages.