Denny Hamlin might just have gotten his mojo back after his victory in Sunday's Aaron's 499 at Talladega Superspeedway.

The much-needed victory, Hamlin's first of the season and only the second for Joe Gibbs Racing and Toyota, pretty much assures Hamlin that he will contend for a NASCAR Sprint Cup Series championship this year, or at least make the playoff round.

More than that, perhaps, it's a confidence booster for Hamlin after a season that's already been filled with highs and lows. If you go back to Daytona, Hamlin won the Sprint Unlimited and his Duel 150 qualifying race and finished second in the Daytona 500. When Hamlin left Daytona, it seemed as though he was about to have the best season of his career.

But a bizarre injury -- a piece of metal in his eye that got infected --€“ forced Hamlin to miss the Auto Club Speedway race. In the four races that followed, Hamlin's best finish was 13th -- and he was 19th at Martinsville and 22nd at Richmond, two of his very best tracks.

All that changed on Sunday, though, and suddenly the 33-year-old Virginia native is right back in the game.

Team President J.D. Gibbs acknowledged that Hamlin was ready for a change of fortune.

"It's very nice," said Gibbs. "He needed it so bad. He's a great competitor, but that win really helped a lot of the past issues get put behind him, and so we were really happy for him to win the race today."

Hamlin took responsibility for some of the team's earlier struggles this season.

"I was honestly really looking forward to California," said Hamlin, who won the 24th race of his career on Sunday. "I feel like we had one of the best cars in practice and didn't get to run that event. After that we've had some bad luck between Darlington and Richmond and Texas where we were all -- we were in top 10 contention, top 5 contention, and just -- I made some pretty bad mistakes two weeks in a row, and then obviously last week getting wrecked at the very end (at Richmond)."

And Hamlin said it was easy for he and the team to have their confidence eroded after a few bad runs.

"You know, those are momentum crushers," he said. "Those things can really bug you, and I sent an email -- we had an email chain with myself and Darian (Grubb, crew chief) and we were talking about we're willing to do whatever it takes to make this better because it's very frustrating to run top 10 and top five all day, and we've been finishing right around 20th for three weeks in a row. I mean, that really can take its toll on the team. Morale can get down very easy when you run great for 480 miles and you blow it all away in the last 20."

Of course, winning cures a lot of ills on a race team.

"A win like this kind of makes you forget all those things, and it obviously gives you a clean slate for the rest of the summer to start over," Hamlin added. "We don't have to hit the panic button at this point. Now we can just focus on working on our program, doing whatever it takes to get ourselves in contention where we're a top five car every week because that's what it's going to take to win the championship."

The championship is the clear objective, and a race victory gives the team the ability to focus on that.

"Now that we have the win now, it gives us some momentumn. The momentum we have now is we can actually go and try things at the racetrack a little bit more free," Grubb said. "We can work on things we know we need to work on, and if the setup doesn't work one week as we try to get better, it's not going to kill us and where we're at in points.  It gives us a little bit more freedom.  We've tested our butt off for the last couple months, and we've learned a lot of things.  We think we're getting better and we've got good things coming down the line.  Hopefully we can just keep all these things rolling and get the momentum going before the Chase starts."