More efficient addToIndex

Do a bulk update instead of folding

Altered items:
addToIndex