Refactored and added test files to spellchecker