client: various cleanups in Main.cpp