Simplify and document getScopeInfo