Simplify data index structure. Replace indexOf check with faster dictionary check.