Format index
Refactor index