Mostly g_clear_object and g_clear_pointer. But also some small simplifications depending on the context.