Improved SVG parsing