Added WebSocket functionality for testing