Allow listening on more sockets (eg. IPv4 AND IPv6) + code cleaning