replaced some glib function calls to g_hash_table_*()