Thesaurus refactor