Remove duplicated code from ContainedLanguage