changed most comments from C to C++ style for BD engine code