Refactored the "Message" class.