template cleanup + alert modal