Simplify code
Accept array as category metadata