thesaurus class refactor