Dxf export code cleanup