Refactoring
Better support of ipv6