Remove redundant text from C++ code