Some oidc refactorings