Tidy up indexing.