refactoring, new tests and 'Collecting YAML localization entries'