Refactor TAB index