Refactored WsSender and WsException