Removal of extraneous line endings