Change stateheader to take pointer, for convenience