Code review

Don't merge, I'm using this as a code review branch.
use `StringBuilder`, which is more efficient. Apply everywhere.