Clean Up of main.cpp