Refactored index