Better timeout support.
Add timeout support for the Listener. Tests.