Brought in DupDef for command line use.
More cleanup