Added MessagesController.cs and some fixes on the other controllers