Transform config_ports to a PortsDetector class. Remove old test server.py