Gobject to glib

Remove deprecated GObject calls and replaced with appropriate GLib calls.