cplusplus: finish the code review.

Minor tweaks of the code as per a more thorough review of the 10k
patch which introduces C++ instead of Objective C.
No bugs found or fixed, only style changes.