added model class for messages and controller for messages