Added persistent storage of optimization variables