Safer, split on any whitespace, cleanups.

Escaping dangerous XSS problems with clean.
Split on /\s/ instead of just whitespace.
Cleaned up to one var, removed trailing spaces, other things.