most of issue # 214. Still need to handle saving of global CI in state dictionary of data set.