introduce StringBuilder
fix msvc warnings
fix a cpplint error