Restore main.cpp

Restored main.cpp to its original state.