Small refactoring in main.cpp.