Adding very simple test IOC, clean up C++ code