Refactor term browser