Refactored code responsible for languages.