Updated MessagesController
MessagesController