cleaning up code from jshint