Create remove categories function