This team was tumbling off the cliff before Keefe took over. They will be better but it takes time. Dubas will address the D next.
I don't think it's quite that simple. A flat cap clearly wasn't accounted for in the plan, and after the Keefe honeymoon period was over, the team went back to pretty average wildcard spot hockey. There's virtually no room to improve the defence substantially, and I don't think too many teams are going to be throwing life preservers. There's key parts of the roster that have expiring contracts at the end of next year, and not all of them can be filled by replacement cap-minimum players.
Even if the team could trade a forward and get back a defenseman of equal value, which is incredibly hard to do, then I still don't think that's a solution. The team needs to be better, not just have talent shifted from one area to the other.
Reality is, the improvement they need isn't going to come externally. Even if they had a ton of cap space the odds of being able to land major talent upgrades in free agency isn't good and the Leafs have already done that. What separates the Leafs from the teams we want them to be like isn't whether or not they've signed good free agents or if they've added top talent with high draft picks, it's the next component. It's adding guys of high value without having high picks or huge cap dollars. That's probably the toughest avenue but it's something that just about every single top tier team has done and, quite frankly, one of the reasons the Leafs are in the situation they are is because the initial relative success of the Matthews era got people all impatient again and so the team didn't maximize their rebuild and so we needed just about every single one of their picks to be a homerun and, well, that's too tough a standard for anyone.
The solution here is more talent. Without cap space, that means internal development. That may be slow and frustrating and some of the rebuilding pain people thought we'd skipped by virtue of going from the 1st overall pick to the playoffs in a year may be coming but, honestly, this isn't a deck shuffling problem. This is a "We need to find our Letang/Keith/Holtby" kind of thing.