Implemented functionality to send and receive basic messages.