Clean publication fragment code