Better newline handling