refactoring globals, mas config and i18n