Refactored indexes to own class