Lookup script complete. Improved indexing