Replace functions with ones that succeed or die with lexical scope
