More work on output templates.