The Trump-back tax bill nears the finish line bruised, bloodied but better than what it replaces.

The House has just voted on the legislation, passing it 227-203. In the Senate, where the Republican margin for error appears razor thin, the vote could come as early as Tuesday evening or Wednesday morning, according to Senator John Cornyn (R-TX).

A bill this substantial — the summary of the reconciliation process between the House and Senate legislation ran 51 pages — contains much good, some bad, and a bit of ugly.

The Good

The bill repeals Obamacare’s individual mandate, which punishes individuals through fines for not purchasing a product, e.g., health insurance. This likely makes for the first salvo in a piecemeal repeal of Obamacare.

It likely results a substantial repatriation of wealth. Currently, companies hold an estimated $2.5 trillion in overseas tax havens, with tech giants acting as the main malefactors. By imposing a 15.5 percent tax on that cash, and one about half that for noncash holdings, the bill reclaims revenue for the treasury at the same time it boosts the economy — when does a revenue booster also serve as a catalyst for the economy? — by disincentivizing sheltering money abroad.

The cut in the corporate rate from 35 percent to 21 percent takes the United States from taxing companies at the third highest rate in the world to putting us at about the average for corporate taxes. Like the tax on foreign cash, this likely encourages Microsoft, Google, and other abusers of the tax code to bring their money back to the United States.

The Bad

The legislation allows taxpayers to deduct $10,000 of combined property, sales, and income taxes, effectively subsidizing high-tax states by granting their taxpayers a sweeter deal than the ones experienced by citizens in low-tax states.

The bill keeps the so-called death tax, which ranks as one of the most inefficient means of collecting revenue on the books. Sure, the legislation doubles the threshold upon which the estate tax applies (though that threshold sunsets in 2026). But a better solution might involve taxing unrealized capital gains upon death and leaving the rest to the heirs.

The plan cuts the top individual rate from 39.6 percent to 37 percent. Compared to the two rounds of cuts during the Reagan administration, which brought rates down from 70 percent to 28 percent, and the George W. Bush cuts, which saw top rates go from 39.6 percent to 35 percent, the Trump cut, at least when applied to the individual rate, appears rather paltry in comparison.

The Ugly

Americans navigated seven rates for personal income before this bill and face seven rates after this bill. So much for simplifying the tax code.

The reduction in revenues invariably result in larger deficits, with some estimates exceeding a $1 trillion over ten years. Even if a booming economy creates a greater pie from which Uncle Sam can grab his piece, this cannot possibly exceed the losses. With the national debt exceeding $20 trillion, this amounts to a serious increase in the deficit when the burden on the shoulders of future taxpayers, and the relatively strong economy, calls for decreasing that deficit. If not now, then when?

Two Cheers for the Tax Plan

Of course, the legislation includes much else to bemoan or cheer. On the whole, the Trump-back plan rates as an overall improvement on the current structure. And given the slim margins he enjoyed in Congress, particularly in the Senate, which still poses an outside chance to derail the legislation, the likelihood that the president could have shepherded through a more ambitious bill seems not very good.

So the bill improves upon the status quo, especially with regard to the corporate tax structure, which currently imposes a rate higher than all but three countries and on the flipside makes it too easy for companies to avoid paying those hefty rates by holding money abroad. But though this law improves upon the current law, it leaves for wonks with much to improve upon in the future.

Hunt Lawrence is a New York-based investor. Daniel Flynn is the author of five books.