adding jshint
refactoring and removing internal dependency on mator