i18n + minor refactoring