Moved most of the listener related processing inside the SERV_LISTENER (to be renamed into Listener) class.