Reverted deletion code back to sleep-based