cleaned up code via jshint #5