Partially implemented undo.
BUGS: Undo gui incomplete, can't undo first command