Use g_clear_object, g_clear_pointer, setup priv pointers in methods
Emit error related code by default