remove unneaded headers, added debug g_fprintf back in for now