Docstring for index_lookup

I don't like the current index system. It's clunky and should be
changed.