LOS ANGELES -- The San Francisco 49ers ended the season with a 34-13 win against the Los Angeles Rams on Sunday. Here's a recap of the season and what's next:

Season grade: Average. The first half of the season is what the first year of a lengthy rebuild under coach Kyle Shanahan and general manager John Lynch was expected to look like. But the trade for quarterback Jimmy Garoppolo and the Niners' strong finish energized the franchise and expedited the rebuild, leaving the Niners seemingly on course for a faster-than-expected turnaround.

Season in review: The 2017 Niners (6-10) will always be viewed in two not-quite-equal parts: the 49ers B.G. (before Garoppolo) and the 49ers A.G. (after Garoppolo). At their lowest point pre-Garoppolo, the Niners were 0-9 for the first time in franchise history and set a record by losing five consecutive games by three points or fewer. Despite those narrow defeats, Shanahan managed to keep his team from fracturing, and when Garoppolo took over, he stepped in with a team that was ready to begin winning those close games. That's exactly what happened, as the Niners closed with five wins in a row.

There's no chance the Niners will let Jimmy Garoppolo test the market. Robin Alam/Icon Sportswire

Biggest play of season: Marquise Goodwin's 83-yard touchdown against the Giants. Sure, there were plenty of negative plays to choose from among all the losses and some highlight-reel plays in the wins, but Goodwin's catch meant so much more than just a touchdown that helped the Niners to their first victory. It happened only hours after his newborn son died from pregnancy complications. The scene of Goodwin blowing a kiss to the sky as he crossed the goal line and kneeling in prayer as emotion poured out of him is one that will be remembered.

He said it: "I believe, it was hard when we went through [the losing], but the fact that we were able to get through it and still find a way to get some wins here recently, I think it made our team stronger," Shanahan said. "When you go through some really hard things with each other and you make it through there, I feel you get stronger from that stuff. I think our team has gotten tighter through it, they've gotten stronger, and that's led to us starting to win a few games and having more confidence. I believe our team feels that they are tough enough mentally to get through anything."

Key offseason questions

Grades, Offseason Questions, More NFL Nation reporters grade each eliminated team's regular season, assess what position each should target in the 2018 draft and look ahead to the offseason. Full coverage »

Biggest draft need: A dominant edge rusher. The 49ers could use blue-chip talent at just about any position, not least of which include receiver, the interior of the offensive line and cornerback, but a top pass-rusher capable of attacking from the edge and helping an already strong interior rush would take the defense to the next level.

Free-agency targets: Investing in the interior of the offensive line, wide receiver and, perhaps, at cornerback, would be logical ways to spend some of the more than $100 million in salary-cap space the Niners possess. The pickings are slim on the offensive line, though the Giants' Justin Pugh or Carolina's Andrew Norwell could be fits at guard with the Giants' Weston Richburg and Denver's Matt Paradis possibilities at center. Among receivers, the Rams' Sammy Watkins is a potential top target on the outside who will likely come at a hefty price, and the same could be said for Miami's Jarvis Landry should he hit the market. At cornerback, big-ticket players such as the Rams' Trumaine Johnson or New England's Malcolm Butler would be worth a look.

What's next for Garoppolo? Shanahan openly acknowledged the possibility the Niners would use the franchise tag to take a longer look at Garoppolo in 2018. That was before Garoppolo became the talk of the league in leading the Niners' dramatic turnaround down the stretch. There's no chance the Niners will let Garoppolo test the market. The question now is whether they will have to use the tag or get him signed to a long-term deal. The best bet is that negotiations will begin in earnest after the season, and if the sides can't come to an agreement before free agency, San Francisco will use the tag to buy more time to negotiate with Garoppolo into the summer.

Stability, finally: Make no mistake, the 49ers are going to have a busy offseason, considering their draft position and available cap space. Barring something unforeseen, though, the Niners are going to go into an offseason without making a change at head coach or general manager for the first time in four years. More important, Shanahan and Lynch seem to work well together. It remains to be seen if their vision will lead to the turnaround the Niners seek, but with Garoppolo in place as well, the much-needed stability and collaborative approach give them a real chance to turn into a legitimate playoff contender sooner than later.