Reworked the listener.