Some refactoring of tenant onboarding