Added code for deleting device related data.