more wordnet refactoring and tests