More template cleanup