Improved StripTrailingWhitespace