Cleans up code to comply with jshint.