Moved process state out of values so that global functions can return
wrapped values