The San Francisco 49ers have a big offseason ahead of them, following the departure of head coach Jim Harbaugh. Defensive line coach Jim Tomsula was promoted as Harbaugh’s replacement, and he and general manager Jed York are looking to help the team rebound from a tumultuous season.

Before the 2014 campaign, the 49ers had reached the NFC Championship in three straight years, adding one Super Bowl appearance, as well. This past season was dominated by rumors that Harbaugh had lost the locker room and that he would be gone by season’s end. San Francisco finished 8-8 and out of the playoffs.

The 49ers experienced disappointments on both sides of the ball. Quarterback Colin Kaepernick struggled for much of the year, leading an offense that ranked just 25th in points scored. San Francisco boasted a top-10 defense, but the unit wasn’t as dominant as it had been in past years.

It won’t be easy for the 49ers to improve their roster. The team owes a lot of money to players that are currently under contract, and they are projected to be about $3 million over the salary cap. San Francisco won’t be able to sign a few of their free agents, and they might be forced to cut some of their most productive players.

Some of the team’s decisions will be based on the future of Justin Smith. The defensive end has one year left on his contract, but he is contemplating retirement. He’s spent the last seven seasons with San Francisco, missing just two games and totaling 43.5 sacks with the club. Smith has a cap hit of just under $6.5 million for the 2015 season.

A few notable San Francisco defensive players are set to become free agents. Cornerbacks Chris Culliver and Perrish Cox are without contracts, and the team might not be able to re-sign both players. Linebacker Dan Skuta stepped up with five sacks, but the team has some depth at the position. The 49ers could also choose to get rid of defensive players that are under contract.

Ahmad Brooks has been a staple on the 49ers’ defense since 2009, but the 49ers have to decide whether they want to pay him in 2015. His six sacks and 30 combined tackles were the least he registered since 2010, and his cap number is nearly $9.7 million. Linebacker Patrick Willis and defensive end Aldon Smith have a combined cap hit of over $18 million, and it’s possible that one of them could find themselves as a free agent. An injury forced Willis to miss 10 games last season, while Smith played just 18 games in the last two seasons because of issues off the field.

On the offensive side, two of the 49ers’ mainstays are set to hit the market. Frank Gore is the organization’s all-time leading rusher, but 2014 was his least productive season in four years, and the team drafted Carlos Hyde in the second round of last year’s draft. Michael Crabtree battled through an Achilles injury over the past two years, and he could be gone, registering just 698 receiving yards in 2014.  

Vernon Davis has one year left on his deal, but he’s coming off the worst season of his career. He played in 14 games, and only managed to catch 26 passes for 245 yards and two touchdowns. The tight end has a cap number of over $7 million, and he would cost San Francisco just over $2 million against the cap, if he were to be released.

The 49ers could have some money to spend, after they cut a few players, but they might be limited on the kind of splashes they can make in free agency. San Francisco will be looking to find an impact player in the draft, and they’ll have an opportunity to land one with the No.15 overall pick.

With Smith possibly retiring, some draft experts have San Francisco looking for help on the defensive line. Highly touted defensive tackle Danny Shelton might be off the board in the middle of the first round, but Oregon’s Arik Armstead and Texas’ Malcolm Brown could still be available.

San Francisco might look to improve offensively, having scored just 19.1 points per game last season. With Crabtree possibly gone and Anquan Boldin entering his 13th NFL season, York could look to give Kaepernick another receiver. Kevin White of West Virginia, DeVante Parker of Louisville and Dorial Green-Beckham of Missouri are options for the 49ers.

Last year’s first round included wide receivers that were among the best rookies in football. Odell Beckham Jr. was taken 12th overall, and has emerged as one of the league’s best players. Sammy Watkins and Mike Evans totaled 2,033 yards in their first NFL seasons.

The 49ers took defensive back Jimmie Ward with the No.30 overall pick in 2014. They’ve drafted a defensive player with their No.1 pick in three of the last four years.