nit: Variables are deleted and listeners unregistered