Added scope_exit class