More consolidation to 'state' module, ahead of a refactor.