move the functions that operate on scope
add the ability to run a function when a scope exits

l3.onScopeExit is flexible enough to be used for creating RAII objects

onExit can be used to specify a function name or raw lines to run
when the current scope exits