Refactored and expanded some methods in the IntentAnalyzer