Move the DHT stuff out of the main program and into the new DHTManager module.