Turn MachineState into an interface