Updated main.cpp to work with single commands