Cleanup of the index library.
Merge branch 'improvement/index-cleanup'