Big server refactoring