Remove unnecessary code in main.cpp