Fix JSHint issues and trailing whitespace
Merge pull request #31 from tmcw/jshint-trailing

Fix JSHint issues and trailing whitespace