Add body deletion and fix event handler