fixes #48: whitelist a category if 3 items in that category are whitelisted

I was only intending to work on this a little, but things got away from me. There's no particular rush in reviewing this.