added jshint and restructured code