YouTube announced Wednesday that it will now take down any videos deemed to insult others based on race, gender expression, sexual orientation or other “protected attributes,” the AP reports. The world’s largest video platform also said they will prohibit veiled threats of violence.

The company, owned by Google, has come under criticism from both politicians and users over inaction that critics say allowed hate speech and extremism to turn into harassment on the platform. Company VP Matt Halprin said the company has been examining its policies for two years, to find a balance between blocking hateful speech while allowing freedom of expression.

The company said it will take action against channels that routinely harass people in its videos, and will also roll out a tool to review comments. In many cases, it will “demonetize” the channel of offenders, which will prevent owners from receiving any revenue.