#2. Refactored contract messages (extracted class Message) before moving forward.