Adding tests and the DHT code