Adding session copying to state/state.go