Split out some subtemplates.