Template logic simplification.