Used g_slice_new instead of g_new.