Adjustments to main.cpp