For most of 1800s, surgery was disgusting, filthy and unsafe. Without anesthesia, speed was of the absolute essence. Robert Liston, one of the most prominent surgeons of the 19th century, accidentally cut off a patient’s testicles trying to quickly perform a leg amputation.

And sanitation was, to put it mildly, not a priority. Doctors’ robes would be caked in blood. Surgeons rarely washed their hands, and they plunged those unwashed hands into patients’ bodies. The situation was so problematic that hospitals would employ a “chief bug catcher” in order to rid their beds of lice. (The chief bug catcher was often paid more than the surgeons.)

“In 1825, a patient had wriggling maggots and mushrooms growing in the damp soiled sheets of his hospital bed,” according to medical historian Lindsey Fitzharris. “What’s crazy is that he didn’t even feel the need to complain about this.”

Fitzharris is the author of "The Butchering Art: Joseph Lister's Quest to Transform the Grisly World of Victorian Medicine." She explains how surgery changed from a vision of hell to something more modern. And she points to one man, Joseph Lister, as being a major force behind this shift.

Lister entered this grimy, grungy world when he enrolled in medical school in 1848. But he didn’t come into the academy entirely unprepared; he brought a microscope with him. Microscopes were looked down upon by the medical establishment, but Lister’s father was keenly interested in the instruments, so Lister grew up with them. And Fitzharris thinks that it was this experience with the unseen world that led Lister to become receptive to Louis Pasteur’s germ theory when it was introduced in the 1860s.

Already an established surgeon, Lister realized that if doctors could somehow destroy germs in the operating theater, patients would be much less likely to get infected. This led him to develop techniques such as sterilizing surgical instruments and hand washing. Modern surgery takes these techniques for granted, but at the time, they were groundbreaking. But it took a while for these ideas to be accepted.

“There was a huge amount of resistance” in the medical community, according to Fitzharris. The way that Lister ultimately triumphed was by teaching young doctors, who would go out into the world and spread his message. And eventually, Lister’s thoughts on cleanliness and sanitation were accepted. He was even asked to treat Queen Victoria.

So every time a doctor cleans their scalpel before cutting you open, every time a nurse makes sure your hospital bed isn’t infested with lice — they’re carrying on in Joseph Lister’s tradition.