Added MessagesModel and used it in returning all messages