Some cosmetics arrangments, move out from main file stuff and created a module server.c