Use StringBuilder to its fullest

Linearized append logic