Code refactoring of main.cpp - simplify exceptions.
Convert indentations to spaces in main.cpp
Redesign GGServer and GGClient modes
Make modes auto register with the factory.