changes to templates and config to get this working more smoothly.