Modularize spell checker code

Change spell checking implementation from functional to more object oriented approach.
Extract this object into a separate module (spellchecker.js).
This will allow for the ability to test the code with Mocha.