sync js and C++ format
revisions to C++ code