Extracted DHT class. Also, FINALLY (actually) fixed the issue with contacting the same nodes repeatedly.