serverMain.cpp added and bugfixes