some gtype and debug cleanup