C++ HW2 cleanup