Fix templates, use map in string-append