More work on sending and receiving messages.