Refactors scope wrappers