Small optimization around event listeners.