Server class refactoring