Change some string addition loops to StringBuilder