Tidy up names and remove some more unused code and xml.