At this point, the biggest loss for MTL is the 3OA pick they spent on JK. He can become, and is becoming, a good player on Carolina but 3 years with the Habs and a lot of mismanagement and probably problems on both sides led to a broken situation.
You're right that Habs can get something valuable on the FA market or in trade for that $4.5m cap space moving forward but it really does feel like a wasted asset. Bergevin obviously a big part of the blame and also until MSL the coaching situation didn't help. Habs should look at this, and a lot of other things, as a time to start with a clean slate and just move forward.
Canes have a player that they like a lot and see can have a big future with them. No complaints over here with that 8 x $4.5ish extension. JK has been very good when needed to slot up in the lineup and fill a bigger role when injuries came up. He's playing limited time because Canes have Aho - Tro - Staal ahead of him right now and he plays best at C. Tro will sign a big deal with someone in UFA and Staal's contract is up after next year. Plenty of time and opportunity to grow into a 2/3C role.