Implemented message formatting.