Managed C++ version.
Small fixes.