Refactor state updating into separate classes to prepare for ZeroMQ stuff