BOSTON (AP) — Like high-schoolers cramming to pull together a term paper just days before it's due, Democratic leaders in the Massachusetts House and Senate are scrambling to get final versions of major pieces of legislation approved and onto Republican Gov. Charlie Baker's desk before they end their formal sessions for the year.

That deadline is Tuesday. Both chambers have opted against coming in over the weekend to debate or vote on any of the bills.

Despite the legislative logjam, a handful of bills have managed to squeak through before the deadline.

On Friday, Gov. Charlie Baker signed two of the bills into law.

One would repeal a number of antiquated, unenforced laws, including a ban on contraception for unmarried women, prohibitions on adultery and fornication, and a ban on abortion with roots dating to 1845.

A second bill signed by Baker on Friday would make Massachusetts the latest U.S. state — along with California, Hawaii, Maine, New Jersey and Oregon — to require people be at least 21 before they can buy cigarettes, tobacco or vaping products.

Earlier in the week, Baker signed a bill that will impose a $2 fee on all car rentals in Massachusetts. The goal is to help raise $10 million for municipal police training programs.

Democratic House Speaker Robert DeLeo had initially planned to have the House work through the weekend to chip away at the backlog of bills and potentially overrides of Baker's budget vetoes.

But newly elected Democratic Senate President Karen Spilka decided against scheduling any weekend formal sessions for the Senate. DeLeo then called off the formal House sessions until Monday.

There's plenty of work to do. And while a number of six-member House and Senate conference committees will still be working to try to come up with final compromise versions of bills, any final action by the chamber will have to be squished into just two days.

That work includes potential veto override.

Baker cut about $50 million from the state's $42 billion budget. He also vetoed a pilot plan to discount tolls for motorists who commute during off-peak hours. Supporters said the plan could help ease traffic congestion.

Even more daunting for lawmakers is the prospect of coming up with — and voting on — final versions of several big bills.

They include bills to address the state's ongoing opioid addiction crisis, regulate and tax short-term rentals websites like Airbnb, designate a state sales tax free weekend this August, ban the use of hand-held cellphones by motorists, create an automatic voter registration system in Massachusetts, and aid struggling community hospitals that are paid lower rates than larger teaching hospitals.

Other bills still unresolved would increase the supply of renewable energy sources, reduce greenhouse gas emissions and remove caps on the state's solar net metering program while yet another bill would outlaw the drowning of all wild and domestic animals and remove a requirement to automatically euthanize animals involved in illegal animal fighting.

Another thorny dispute between the House and Senate that is as yet unresolved is how best to spend the billions of dollars the state sets aside each year for local schools.

At the center of those negotiations is the state's so-called foundation budget, which was meant to help smooth out some of the educational disparities between wealthier communities and poorer ones. Backers of a Senate bill say the House's version fails to adequately increase funding for schools with high percentages of low-income students and English-language learners.

The last minute high-wire act has many activists urging their supporters to call their lawmakers and demand action as the clock ticks down.

After Tuesday, the Legislature goes into informal session for the rest of the year, meaning the likelihood of approving anything by noncontroversial bills is nearly impossible. In January the process will begin from scratch, with any bills not approved this year having to be filed again.