Added Factorial to C++ and fixed some small errors