Destroy open popups on E shutdown
Cleanup debug messages and remove a commented function