Added the main code and C++ headers.