fix newlines and whitespace