Implementation of jshint and corrections of errors.