The Colorado state Capitol on Monday, Jan. 9, 2017.

(Nathaniel Minor/CPR News)

Colorado's state legislature wrapped up its work late Wednesday night. Over the past four months, state lawmakers introduced and debated nearly 700 bills. Among them were some big bipartisan wins — and losses.

Lawmakers argued into the last minutes of the session over a plan to re-authorize the Colorado Energy Office. But they couldn’t come to a deal, which means the office will be powering down, July 1, when most of its funding runs out.

Democrats wanted the office to continue with its current mission focused on renewable energy. Republicans saw this as a chance to trim some of those programs and change the mandate to support a different energy mix, including fossil fuels.

“We want to have a discussion about a broad energy policy in the state,” said Rep. Cole Wist, R-Centennial, “and for quite some time, the Colorado Energy Office has been a one-trick pony, only focusing on renewables.”

Republicans and Democrats also disagreed over a provision of the bill that would have allowed investor-owned utilities to purchase natural gas reserves.

House majority leader KC Becker, D-Boulder, emphasized that lawmakers can try to revive the office next year.

“The Colorado Energy Office will still exist — it just won't have the same funding that it did before,” she said.

Earlier on the final legislative day, another group of lawmakers wrangled over a bill to define what counts as “public consumption” in Colorado’s marijuana laws, with the big sticking point being whether people should be able to smoke pot on their front porch.

Rep. Dan Pabon, D-Denver, described the debate this way: “We're trying to decide whether marijuana consumption is more like smoking a cigarette, or is it more like standing nude on your front porch?”

In the end — and despite consulting images from TV sitcoms to try to settle on the exact definition of a ‘porch’ — lawmakers couldn’t agree, which leaves the question of what counts as public consumption up to local governments.

While there was plenty lawmakers couldn't agree on in the course of the session, Republican and Democratic leaders did chalk up one big win: SB17-267, a massive bill to restructure the state’s finances. The package does everything from changing the state spending limit to increasing Medicaid co-pays and marijuana taxes. It also includes a tax cut for businesses and sets aside new money for Colorado schools and roads.

One of the main motives for lawmakers to pass the bill was that it allowed them to avoid a loss of half-a-billion dollars in government assistance to safety-net hospitals around the state.

Kevin Stansbury, CEO of Lincoln Community Hospital on the Eastern Plains, said he was “tremendously grateful” lawmakers passed the measure.

"It helps us to better understand how we can map our future,” Sansbury said. “The biggest concern of all of this has been the uncertainty.”

However a number of conservative Republicans resisted the measure, concerned about its wide-ranging impacts on state finances. Rep. Tim Leonard, R-Evergreen said it’s “very difficult to solve old problems when you create new problems.”

Among its many provisions, SB17-267 creates a program to sell up to $1.8 billion worth of bonds for roads and transportation projects. Even that large number is well short of what lawmakers hoped to achieve on transportation this session.

Both sides agreed roads need fixing and traffic is getting worse. But in the end, they couldn’t agree on a long-term solution.

The Democratic House Speaker and Republican Senate President both threw their political capital behind a measure to ask voters to raise sales taxes to fund roads and transit projects. But the measure died in April in a Republican-dominated Senate committee.

“It was basically a blank check to everyone and it still didn’t really address the specific areas that I think that our voters, that my constituents are asking about getting roads and bridges built,” said Sen. Tim Neville, R-Littleton.

Voters may very well end up having a say on this issue anyway as several transportation funding initiatives have been filed with the Secretary of State’s Office.

Lawmakers did make some headway on an issue that’s been debated for years at the Capitol – how to deal with lawsuits over shoddy condo construction. Many builders and policymakers blame litigation for slowing the construction of more affordable housing.

Gov. John Hickenlooper is expected to sign a bill to increase the number of homeowners in a condo association needed to approve any lawsuit and require them to have more information before they decide.

“It’s a big step forward,” said bill sponsor Rep. Alec Garnett, D-Denver. “ I don’t think it’s the silver bullet, but I don’t think there really is a silver bullet.”

Lawmakers also chalked up a laundry list of smaller wins at the end of the session.

News organizations and government watchdogs are celebrating a bill that should make Colorado's public information may become a little easier for the public to analyze. It requires government agencies provide data in the same electronic format it's stored in. That makes it more likely people filing open records requests will get easily usable information back. In the past, agencies could respond with unsearchable PDFs and other formats that made analyzing data much more difficult.

The legislature also approved a bill to require more transparency when law enforcement seizes money or private property during an investigation. The state will start to track how agencies use the process known as "civil forfeiture." That information — including what officers have seized, why, and what their departments do with it — will be publicly available online.

Another issue a lot of lawmakers say they feel proud about this session, was work they did to address drug addiction, passing a handful of bills to provide more resources for those seeking treatment.

The issue is personal for Rep. Brittany Pettersen, D-Lakewood, whose mother is a heroin addict. One of Pettersen’s bills, which could open the door for Medicaid to cover inpatient rehab and detox, passed on the final day of the session after long hours of work.

“Everything that you do, you put your heart into,” Pettersen said tearfully afterward. “So when you get these wins, you’re overwhelmed with emotion.”

Pettersen also chalked up some of her tears to exhaustion, after a long run of late nights, as lawmakers rushed to finish their work. She and Colorado’s other 99 legislators will have plenty of opportunity to catch up on their sleep now that the 120-day session is finally in the books.

CPR Capitol reporters Vic Vela and Sam Brasch and editor Megan Verlee contributed to this report