Remove trailing whitespace

I was reading through the code, trying to understand stuff and fix a bunch of
things and found that no coding convention is strictly followed. Just removed
all trailing whitespace as a starting point to cleanup stuff. 

Is it worth the effort to make it jslint/jshint valid? Any thoughts/comments?