Made thesarus modular and more readable