First version of the new main.cpp file