Use GLib.MainLoop instead of deprecated GObject