Cleaned up main.cpp.