cleanup code to optimize gradients in inkscape files