As stunning, awkward, and unsettling as it may have felt, the Dallas Mavericks needed a week like this. Even successful organizations need an occasional shock to the system, and this franchise could hardly have had a bigger one, with the twin departures of the best general manager and coach the team has ever had.

General manager Donnie Nelson was fired by team owner Mark Cuban after 24 seasons with the Mavs. Coach Rick Carlisle resigned, probably in protest of Nelson’s ouster, although he did not say that. The two of them, friends for four decades, are highly respected in NBA circles and unlikely to be out of work for long.

Now team owner Mark Cuban can chart a new path with a historically important decision: the hiring of a new leadership team that will be expected to steer the Mavericks, with Slovenian prodigy Luka Dončić already a perennial MVP candidate in the NBA at the age of 22, back into title contention.

As Cuban rebuilds the front office, he should remember the importance of management structure. Although Cuban vehemently denies it, there appears to have been significant internal turmoil between the outgoing team leaders and Cuban’s bright and shiny new object, a former professional sports gambler named Haralabos Voulgaris who now works as a quantitative research analyst for the Mavs. According to an article published Monday in the Athletic, several members of the franchise’s basketball operations and coaching staffs viewed Voulgaris as having overstepped his authority.

Voulgaris also appears to have important differences with Dončić, perhaps the most important person in the organization. In one instance, Dončić shouted curses at Voulgaris during a game because he believed the staffer had signaled for him to calm down. In another, Voulgaris was seen leaving the court before a game had ended, a signal he’d given up on the team.

No matter how much Cuban likes him, Voulgaris’s chances of leading the post-Nelson Mavericks probably evaporated in those two moments. Now Dallas has to hope that Dončić will sign the five-year, $201.5-million “supermax” contract extension he’ll become eligible for in August. Dončić is close with Nelson, but that’s unlikely to persuade him to turn down life-changing money. On the other hand, if he signs the contract, Mavs fans should not assume that all is forgiven.

The NBA is the one professional sports league in North America that understands that it’s about the players. Dončić will sign the contract, but if he decides he doesn’t like the Mavs’ direction, he’ll figure out a way to leave.

Back to Carlisle and Nelson. Though the Mavericks won just one playoff series in the last decade, they did the hardest thing a franchise can do. That’s not just win, but win over a sustained period of time. In thirteen seasons together, Nelson and Carlisle led the team to the playoffs nine times and delivered one of the city’s coolest sports moments by winning the 2011 NBA championship over the heavily favored Miami “Heatles,” led by LeBron James, Dwyane Wade, and Chris Bosh.

The Mavs’ organizational stability was the bedrock for much of the team’s success, most notably Nelson’s draft-day trades that brought Dirk Nowitzki (who is returning to the organization temporarily to help Cuban with the new hires) to Dallas in 1998 and Dončić to town in 2018.

Having acquired one franchise player, then another, and consistently built winning teams around them makes Nelson one of the NBA’s elite talent evaluators. In nineteen years as the president of basketball operations, Nelson walked the fine line between keeping the Mavericks in contention and intentionally tanking an entire season (or seasons) to facilitate a complete roster overhaul. Despite the disappointment of blowing early series leads against the Los Angeles Clippers in the last two postseasons, Nelson will leave Dallas in as strong a position as almost any other team to win future NBA titles, because of the simple fact that he acquired Dončić.

That he did this speaks volumes about Nelson’s understanding of the things that win in the NBA. Parting ways with an executive as good as Nelson is the biggest gamble Cuban has taken since buying the team.

And it’s unlikely that the Mavs’ transition from Dirk to Luka would have appeared so graceful without Carlisle as head coach. To watch Carlisle work his magic during Nowitzki’s twilight years, when NBA talking heads predicted that rosters surrounding the German great with J.J. Barea and Devin Harris would make the team nosedive down the Western Conference standings, was a revelation.

Nelson was one of the NBA’s pioneers—and he was better at it than almost anyone—at identifying and recruiting European talent. His decision to add an international flavor to his rosters didn’t just make the Mavericks better. It played a role in the explosive growth and appeal of the NBA around the globe.

That Nelson developed such a close working relationship with Carlisle—that’s not always the norm in the NBA—speaks of their mutual respect. Carlisle was said to have clashed with Dončić at times this season. In the statement he released Thursday to announce his resignation, Carlisle thanked Cuban, Nelson, former players Nowitzki and Jason Kidd, several members of the front office, and “every player and assistant coach I’ve ever had here.”

That he didn’t mention Dončić by name will be seen as a signal that their relationship was less than perfect. Their disagreements could be seen playing out on the sideline at times during games, and it’s reasonable to believe that their differences were even more pronounced behind the scenes.

Dončić is a generational talent, but he walked onto an NBA court as a nineteen-year-old. No player that young—not LeBron James, not Kobe Bryant—has ever been fully prepared for the grind of an NBA season. James didn’t even make the playoffs until his third season in the league. Bryant did make the playoffs with the Lakers as an eighteen-year-old, but he did it riding in the child safety seat of a vehicle that had Shaquille O’Neal behind the wheel.

Dončić may benefit from a new voice and a new point of view in roster construction. But it’s important to remember that he’s a player who can be the Mavericks’ cornerstone for a decade of success. Whether that means winning championships is less clear.

Cuban has hired a search firm to assist with his hiring of a new general manager, who presumably then will (with Cuban’s approval) hire a coach. He could stay in-house for both hires, promoting vice president of operations (and former player) Michael Finley to GM and promoting highly regarded assistant Jamahl Mosley to head coach. (Mosley appears to have a solid relationship with Dončić.)

Because of Dončić, the Mavericks jobs could be among the NBA’s most appealing openings for prospective coaches and executives. But the team’s roster needs work, beginning with coming up with a productive role for center Kristaps Porzingis.

Cuban fancies himself as both a sharp basketball executive and a business visionary at the cutting edge of innovation. NBA organizations are stacked with all kinds of front office and coaching talent, from former players to Ivy League whiz kids to video room grinders. If Cuban’s really, really lucky, he may find another duo as good as Donnie Nelson and Rick Carlisle.