Use StringBuilder. Fixed while space handling.