Further server refactoring.