when no further work is required, clean up and remove event listeners and timeout