Update 35: Changed hash table management

I replaced calls to g_hash_table_insert with calls to g_hash_table_replace
so that the old key is freed and replaced with the new key.