adding c++ port + fixing a few documentation bugs