Added jshint and updated all js files to pass jshint rules. Restructured the dep scripts.