Lose celebrities on Instagram and risk the entire platform collapsing. That's something Kevin Systrom, CEO and cofounder of Instagram, realized last year—it inspired him to transform his app into a more "safe and inclusive" community, according to a new profile in Wired.

Instagram's first test case: Taylor Swift and her snakes.

SEE ALSO: Instagram will now let you hide offensive comments automatically

The pop singer, an active Instagram user who would frequently post photos of herself and her squad, was being harassed on the platform.

In the summer of 2016, after her public fallouts with Calvin Harris, Katy Perry, and Kim Kardashian, the comments below her posts "were followed almost entirely by snake emoji: snakes piled on snakes, snakes arranged numerically, snakes alternating with pigs," the Wired piece reads.

Instagram took action. Now, you'll most likely just see praise on praise on praise.

🌟🎉🍾🎂 A post shared by Taylor Swift (@taylorswift) on Oct 24, 2016 at 5:39pm PDT

The platform had "quietly built a filter that would automatically delete specific words and emoji from users’ feeds." For Swift, that meant no more snake emoji.

Instagram has continued to work to make Instagram a cleaner place. Last year, users were gifted the ability to disable all comments. In June, Instagram introduced new filters that will automatically block "certain offensive comments" and spam.

And we come back to Swift. Instagram has been training its technology—a system named DeepText—with, of all things, Kanye West's rap lyrics.

"It also had trouble recognizing Kanye West lyrics," the Wired piece reads, referencing West's song Famous and the lyric: "I feel like me and Taylor still might have sex."

"It was entirely at ease, however, with more creative Kanye insults like “You left your fridge open / somebody just took a sandwich," the piece continued.

But at least the snake filter is perfect.