remote trailing spaces + fix jshint warnings