Massive server refactoring