Refactor Task Index