Implemented controller, model, and view to manage messages.