clean up code using jslint