cleanup batch template of \n tokens