Refactored WebSocketServiceHostManager.cs