Improve analyzeMessageContent