fix ChatMessage + minor cleanup