[M] More re-factoring in the main.cpp.  Cleaning up variables that are no longer needed.