Implemented the spellchecking function.