refactoring the gazetteers