Simplify Problem 10 to use C not C++
Simplify Problem 7 to use C not C++
Remove unused cpp common code