Update main.cpp with minor fixes

initialized a variable that was not initialitzated, changed the error code of the exit  to 1 because there is a error, cleaned some astetic aspects (specialy the includes and the translate function).