Integrated onestepCD with current progress in main.cpp