Refactor AutoCorrector