Remove all whitespace at beginning/end of the text; fix a couple of jsHint warnings.