Rough stab at removing event listeners on shutdown