Fill in all Main.cpp missing code