Refactor spellchecker class into backend subclasses for better extensibility