Convert map / tmpl to use talloc