Index updated and refactorized