adds event listener tracking; fixes various memory leaks