New version of CS generation script

Bunch of stuff cleaned up, brought in line with new capabilities of
XML_SVG package.