C++ improvements