add command line parsing to xml_cleanup, and other things