Cleanup and line endings