Dht.py Code Cleanup