introduced jslint and fixed warnings