Canada’s wildly out-of-date Criminal Code will finally get renovations in the near future, thanks to legislation tabled on Tuesday.

Section 365 is all about “pretending to practise witchcraft.”

Many sections of Canada’s criminal law go back more than a century, and reading through the 1,200-plus pages of the code makes that pretty obvious.

Section 71 reads that “every one who challenges or attempts by any means to provoke another person to fight a duel” is guilty of up to two years in prison. Section 365 is all about “pretending to practise witchcraft.” Littered throughout the code is language around “crime comics” — a name for gritty post-WWII comic books that sparked a moral panic after being blamed for causing youth delinquency.

It’s those sections that have been the target for Justice Minister Jody Wilson-Raybould, who is planning on repealing those anachronistic laws through bill C-51 (not to be confused with the previous government’s anti-terrorism legislation.)

C-51 will remove criminal prohibitions on:

Duels

Offering a reward for stolen or lost property, “no questions asked”

Blasphemous libel, whereby someone mocks or slanders religion

Pretending to practise witchcraft

Issuing trading stamps

Impersonating someone who is taking an exam

Falsely claiming a royal warrant (a permit allowing someone to advertise that they have permission from the monarchy to produce a good)

The majority of these laws are no longer in effect — either due to their oddly specific nature, or because the Supreme Court has declared them unconstitutional — and many are holdovers from a colonial legal era.

Last year, the federal government made first steps towards cleaning up the code when they introduced legislation to repeal the differential age of consent for anal sex — a law that, while it was declared unconstitutional by several provincial courts over the years, remained a sign of discrimination against Canada’s gay population.

Many legal scholars have been clamouring for a clean-up of the code in recent years, however, for far more serious purposes.

Courts have struggled to determine where to draw the line when it comes to intoxication and consent in recent years.

In 2016, an Alberta judge relied on an unconstitutional provision of the Criminal Code to convict Travis Vader of second-degree murder, and was forced to knock the charges down to manslaughter due to the mistake.

There’s also situations where the Criminal Code hasn’t been updated to add clarity that was provided by the Supreme Court.

Courts have struggled to determine where to draw the line when it comes to intoxication and consent in recent years. To that end, Wilson-Raybould’s legislation will “clarify that an unconscious person is incapable of consenting,” according to a government backgrounder.

The law will also expand Canada’s rape shield laws — rules that limit how lawyers can cross-examine sexual assault survivors about their past sexual history — to clarify that one can have legal representation during those proceedings, and that evidence of a person’s past sexual communications can’t be used to infer consent.

A prime example of that situation occurred in the prosecution of radio personality Jian Ghomeshi, where messages from the the women, who were alleging sexual assault, were entered into evidence to undercut their allegations.

Perhaps the most momentous thing to happen in this legislation, however, is a new requirement that will force the minister of justice — and all future occupants of that job — to introduce a report alongside every piece of government legislation, explaining its possible implications on Canadians’ constitutional rights.