Headers C++ wrapping, bug fixes.