Refactoring on StringBuilder