Fix #447 while we’re at it.
Simplified rendering using a separate template.