Some dht fixes and debugging support added