Formatting. Kill some code in dumpString().
More java to kotlin conversion.