[Server] Minor code refactoring