Server refactored