Make the writer formatting match the expected results and change tests
so that differences in the line.separator don't cause the tests to fail.
remove unused import