Created WordDetector class for finding words.