Implemented skeleton code to process messages in model and controller.