improved redrawing logic for undo cut/paste (need to check remaining undo/redo actions), other minor cosmetic fixes