cleanup whitespace parsing