extracts model-tenantizing code so extensions can reuse