Refactored dxf inspect code