Improve the javascript after jshint report