refactoring pattern loader and translators