template cleanup.