Added class OnScopeExit.