more server refactoring
more server refactoring