Clean up setting the classes in SVG; get much of the measure class implemented.