The final month of the Phillies' season has seemed to create enough optimism to erase the doubts that festered this summer about the team's future when they were willowing through June and July. And it was four of those reasons who took charge on Wednesday night in the fifth inning of a 7-5 win over the Nationals.

Nick Williams reached on a fielder's choice. Rhys Hoskins walked. Aaron Altherr rocked a two-run triple with a lumbering Hoskins sliding safely to tie the game. Then Odubel Herrera — who seemed to be written off this summer as the team struggled before he too found himself — smashed a go-ahead double.

Those four batters, the ones who rallied the Phillies on Wednesday, are projected to be the heart of next season's lineup. Just one of them, Herrera, started this season's opener. The tide of the season began to shift in late June when Altherr played so well that the Phillies had to cut ties with Michael Saunders. Remember him? The shifting continued when Williams reached the majors a week later. And a month later — when Hoskins arrived — was when the season turned and the optimism poured.

"When you're not hitting and you don't have the offense, it looks like the team is getting down. You hear that all the time. There's no energy. Well, when nobody gets on base it's hard to have energy," manager Pete Mackanin said. "But I'm proud of the guys, the fact that they play hard the entire season in my opinion. We just didn't have the offense clicking the first half and that was part of our problems. But in the second half things started clicking. We started playing better baseball."

The Phillies will finish off the season this weekend with three games against the Mets. They will then pack their bags for the offseason and empty their clubhouse stalls. And that optimism — the feeling that overtook this team for the last month — will follow them to spring training. The Phillies will have a legitimate lineup — no more one-year rentals to plug holes as we wait for the prospects to arrive — when they start the season in Atlanta. That's enough reason for optimism.

"I made the comment that 'We need better players.' Well, we have some players here that I think are going to improve and become better players," Mackanin said. "A whole host of them on the team. We're hoping that these guys can reach their potential as quickly as we can. We have a lot of guys that I like and I think can improve. It's just a matter of time."

The three-run fifth followed Washington's own three-run fifth as they chased Mark Leiter Jr. after 4 1/3 innings. The righthander ended his season with five earned runs on eight hits. He struck out five and walked three.

Leiter, a 22nd-round pick in 2013, began his season in minor-league spring training. He ended it by throwing the fifth-most innings (90 2/3) by any Phillies pitcher. The 26-year-old righthander struck out 84 batters and registered a 4.96 ERA in 27 appearances.

Leiter showed some flashes this season and also took his lumps, like he did on Wednesday night. He could report to spring training with a chance at a rotation role, but his future seems to be in the bullpen as a long reliever. Leiter flourished there this season before he was needed as a starter. Mackanin said before Wednesday's game that he liked the pitcher as a long man.

"I learned a lot. I really did," Leiter said. "There was a lot of learning experiences and things that I had never experienced before. To be able to do that at the big-league level was a good way to learn. There's a lot of positives in there and some things that I could fix. I'm definitely looking forward to learning from it and getting better."

The bullpen impressed again. Yacksel Rios, Hoby Milner, Victor Arano, and Luis Garcia combined for 4 2/3 scoreless innings. Garcia touched 99 mph in the eighth and Neris used his splitter to record the save. The unit — which tossed four perfect innings on Tuesday — has compiled a 2.52 ERA over its last 30 games. It is the fourth-best mark in the majors over that span. The Phillies will add some relief arms this winter to add to what is shaping up to be a strong group.

Jorge Alfaro, another reason for optimism, hit a two-run double in the second. He finished 2 for 3. Altherr went 2 for 4. Hoskins reached base three times and scored two runs. Herrera had two hits and made a ridiculous catch against the wall in left-center to rob Jayson Werth of extra bases. He jumped on a chest-high fastball in the fifth and stroked it up the middle. The ball rolled to the foot of the warning track and Herrera sprinted to second. Altherr scored and the rally was complete. Herrera slid, popped up, pounded his waist and pointed to the dugout. The optimism felt real.