removed path dependency, using native path
added jshint and fixed errors