Some additional changes to allow for C++