Added support for undo redo of devices