Slightly more elegant newline handling.