Added a new test script, tweaked the C++ file.