Added message send and receive functionality.