Code cleanup in main.cpp.