Refactored svgCoords2Path