Added support for handling synonyms.