Updated the messages functionality.