When Jack Lew's predecessor, Timothy Geithner, took up the reins as Treasury secretary in 2009, Wall Street was collapsing, the unemployment rate was spiking, and the deficit was racing toward $1.5 trillion.

Four years later, the economy is improving and Lew's job managing the federal government's finances and regulating Wall Street is looking easier by the week.

While the outlook is far from perfect, a few pieces have fallen into place for the 57-year-old Lew, who was previously budget director for President Obama and President Bill Clinton.

The deficit has shrunk. The fiscal cliff deal Congress made at the beginning of the year boosted taxes and reduced spending. Thanks also to slow but steady economic growth, this year's deficit is supposed to top out at $627 billion, according to the Congressional Budget Office. That's a lot of money, but it is significantly less than last year's shortfall of $844 billion, and would be the smallest deficit since before Obama came into office in 2009.

Another bonus for Lew is that the debt ceiling deadline has been pushed back. Lew, who took office in February, was supposed to be thrown into a debt limit battle like the one that threatened the world economy in 2011. The government reached the debt ceiling in May, after it had been suspended in the fiscal cliff deal. Lew took emergency measures to free up funds from elsewhere in the budget to allow the government to function without accruing additional debt.

That process was made easier later in May when the Treasury received a $60 billion dividend from government-owned mortgage buyer Fannie Mae. Along with rising revenues from a slowly recovering economy, that windfall allowed Lew to announce he could keep the government running through at least September. According to the Bipartisan Policy Center's estimates, Lew will not face a debt crisis until October or early November.

The chances of a default-triggered financial catastrophe are slim in any event, but the breathing room allows him time out of the spotlight for other tasks.

Not the least of the recent good news for Lew is that a change in the way he signs his name has been well received. His previous signature -- an illegible and goofy series of loops -- was mocked when his nomination was announced and the media noted that it soon would be on all U.S. currency. Lew's new and improved -- and slightly more readable -- signature was unveiled by the Treasury last week.

The U.S. still faces a long-term debt problem, and Lew's legacy will be shaped by his ability to get the country's finances in order. But in recent weeks the breaks have gone his way.