Undo function mostly finished. Added target output files.