Code cleanup and fixed minor issues - C++

Code cleanup and fixed minor issues - C++ - Chapter 1