cleaning up C++