templating and data model fixes