Updated whitespace logic