Updated handling of whitespace