Refactor ndjson into an in2csv format. #329.