Refactored to EDIWriter.