move state vars to exec and namespace; move keys from monad to monad.context