Refactoring for new WebSocketContainer version