Miscellaneous code improvements for svg.js
Merge pull request #5179 from timvandermeij/misc-svg-fixes

Miscellaneous code improvements for svg.js