Refactored Message class.