Reverted last changes to main.cpp