more template cleanup