refactoring, cleanup line endings