Clean up whitespace handler logic

"I heard you're idea's and their definately good." - xkcd #1238

Yes, your final solution is much prettier.