adding newlines and fixing line endings