Update generator to use stringtemplate v4