Pre-build item -> category mapping and simplify / optimize all the generation code...