GMainLoop-related cleanup