Supervized template cleanup.