A few more simplifications

Now using sequence of char instead of string
Now filtering out whitespace chars in one place