Updated main.cpp to work with semicolons