What's the purpose of this?
It looks like it removes empty lines, but if a line is \r\n, would it not just remove up until the \r and leave the \n in place?