fixed null pointer with location key and DHT.remove. Cleanup up code.