paper template cleanup