Refactoring locales service