Use G_DEFINE_WITH_PRIVATE
Bump glib to the version 2.38
Some cleanup, no need to do the casting