added mode specific data saved in add-device view & code cleanups