add scopes, some interface fixes