Refactor, add Grunt, Mocha, expect and chai ready for unit testing