Added erase function to device modal