More template improvements.