Improved whitespace functions