Fixes to state recording
Prefab for the globals