Refactor code to make more use of `LanguageCode`