Filled in some of the code for creating a new message.