Refactoring the Server module.