Refactor the 'history' part of process state as a 'state-log'.