Some cleanup of templates.