A frantic race to finish up legislation on Beacon Hill came to a conclusion this weekend.

Lawmakers worked until a little past midnight Sunday into Monday getting some key bills passed before legislative rules required formal sessions — the only time they can take up substantive bills — must end.

When it was all over, Senate President Stan Rosenberg proclaimed the session a success.

"A lot of quality legislation came out of the Senate through the entire 18-month period. A lot of our top priorities made it through the Senate and to the governor's desk," Rosenberg said. "Others we'll pick up again next year."

Lawmakers went right down to the wire, with override votes and last-minute passage of some major pieces of legislation.

On Saturday, when it looked like no bills were going to emerge out of conference committee, a very frustrated Rosenberg lay the blame for the backlog on the House, saying they waited too long to get bills out of committee. But after the session ended, he seemed a little less frustrated by the process.

"I'm hoping we can talk about how to make things better and improve the process going forward, in a collaborative way. Not a hostile way," he said. "This isn't about pointing fingers and you know, it's about how do we make things better?"

From left: Republican Gov. Charlie Baker, Democratic Senate President Stanley Rosenberg and Democratic House Speaker Robert DeLeo, during a 2015 news conference at the State House (Steven Senne/AP)

After the session ended, Gov. Charlie Baker issued a written statement saying he's thankful the Legislature took action on several important pieces of legislation ranging from economic development to renewable energy.

"As our administration carefully reviews all of the legislation that lawmakers worked diligently to reach consensus on, I will continue to work across the aisle with our partners in the Legislature to make Massachusetts a better place to live, work and raise a family," he said.

Here's a look at some key bills that made it to Baker's desk:

Economic Development And Job Creation Bill (H4569): The $740 million bill provides funding for all sorts of programs, including career and technical training.

The final version did not contain a Senate proposal to extend the state's hotel and motel tax to online, short-term rentals like Airbnb.

Taxi drivers wearing yellow T-shirts sit together during a hearing on the regulation of ride-hailing companies such as Uber and Lyft, at the State House in Boston last year. (Steven Senne/AP)

TNC Ride For Hire (Uber, Lyft) Bill (H4570): The bill imposes regulations on emerging Transportation Network Companies like Uber and Lyft.

The final compromise does not include requiring Uber and Lyft drivers be fingerprinted, but they will be subject to a two-step background check by both the company and the state.

It also does not limit TNCs from operating at Logan Airport or the Boston Convention Center — restrictions the House and the taxi industry wanted. Lastly, the final bill includes a 20 cent-per-ride surcharge, with that money going back to cities and towns to help maintain roads.

Energy Bill (H4568): A very complex piece of legislation that has been identified by Baker as a major priority. The bill would allow utilities to purchase 1,600 megawatts from renewable sources, including offshore wind and hydro power.

Gone from the final version is Senate language barring utilities from obtaining rate increases from customers in order to pay for building new natural gas pipelines.

Gov. Charlie Baker testifies at a hearing regarding two energy bills at the State House on Sept. 29, 2015. (Charles Krupa/AP)

While it's not everything he hoped for, George Bachrach, of the Environmental League of Massachusetts, said he is pleased with the bill.

"All of us want to move faster and further than we have, but this is a very important start," Bachrach said. "We have no wind farms, offshore wind farms, in America today. Massachusetts will be first to have a commercially scaled wind farm."

Senators had also hoped for even more incentives for renewable energy. They promised to bring up another energy bill in the next session.

Municipal Modernization Bill (H4565): The governor termed this “the Weed Whacker” bill, saying it takes a weed whacker to all sorts of antiquated laws that have hampered municipal governments around the state. For example, it allows communities to set speed limits lower than what the state allows.

One provision that did not make it to the final compromise bill would have removed the requirement that the city of Boston ask the Legislature for permission to increase the number of liquor licenses in the city. Boston Mayor Marty Walsh wanted the city to have that authority on its own. But for now, any increase in liquor licenses must continue to receive the Legislature’s blessing first.

In addition to the legislation, lawmakers spent much of the weekend finishing up overriding roughly 200 line item budget vetoes that had been issued by the governor. Baker, citing uncertainty due to the downturn in revenues from the capital gains tax, had slashed $256 million from the FY 2017 state budget.

But legislators returned over $227 million to the spending plan, including $7.7 million to arts programs around the state. Lawmakers also overturned a Baker veto of language requiring insurance companies to cover long-term antibiotic treatment of Lyme disease. That's a treatment that's not accepted by everyone in the medical community.

Correction: An earlier version of this article incorrectly identified the organization Bachrach works for. The post has been updated. We regret the error.