Use g_ptr_array_unref() where appropriate, and cast to GtkTreeModel since GtkListStore implements that.