SVG utils: move precision update and style stripping into own methods

This makes them more reusable and makes the single functions more readable.