Awesome work!
I ran the 4 shape example through SVGOMG and lowered the precision slider down until it didn't affect the perceived output.
The result was about 40% of the original size.
https://jakearchibald.github.io/svgomg/
SVG tested:
https://camo.githubusercontent.com/ffa6eed9348fcd42454fc3916...
Side note -- if using React, svg2jsx is great for converting the SVG properties to React JSX names.