Use globalScope for proper scoping.
Merge branch 'global-scope' into peerlibrary