anchor.diff:                  match timeLocal with
                   | 0L when target.CharacterState.IsHealthy ->
                       if target.CharacterState.IsHealthy then
  -                        withMsg battleRunning (AttackCharacter (sourceIndex, targetIndex))
  +                        withMsg model (AttackCharacter (sourceIndex, targetIndex))
                       else // target wounded, cancel attack
  -                        let battleRunning = { battleRunning with CurrentCommandOpt = None }
  -                        withMsgs battleRunning [ResetCharacter sourceIndex; PoiseCharacter sourceIndex]
  +                        let model = { model with CurrentCommandOpt = None }
  +                        withMsgs model [ResetCharacter sourceIndex; PoiseCharacter sourceIndex]
                   | _ when timeLocal = 1L * int64 source.CharacterAnimationState.Stutter ->
  -                    withMsg battleRunning (DamageCharacter targetIndex)
  +                    withMsg model (DamageCharacter targetIndex)
                   | _ ->
                       if CharacterAnimationState.finished time source.CharacterAnimationState then
                           if target.CharacterState.IsHealthy then
  -                            let battleRunning = { battleRunning with CurrentCommandOpt = None }
  -                            withMsgs battleRunning [PoiseCharacter sourceIndex; PoiseCharacter targetIndex]
  +                            let model = { model with CurrentCommandOpt = None }
  +                            withMsgs model [PoiseCharacter sourceIndex; PoiseCharacter targetIndex]
                           else
                               let woundCommand = CurrentCommand.make time (ActionCommand.make Wound targetIndex None)
  -                            let battleRunning = { battleRunning with CurrentCommandOpt = Some woundCommand }
  -                            withMsg battleRunning (PoiseCharacter sourceIndex)
  -                    else just battleRunning
  +                            let model = { model with CurrentCommandOpt = Some woundCommand }
  +                            withMsg model (PoiseCharacter sourceIndex)
  +                    else just model
   
               // else target destroyed, cancel attack
               | None ->
  -                let battleRunning = { battleRunning with CurrentCommandOpt = None }
  -                withMsgs battleRunning [ResetCharacter sourceIndex; PoiseCharacter sourceIndex]
  -
  -        let tickWound characterIndex time timeLocal battleRunning model =
  +                let model = { model with CurrentCommandOpt = None }
  +                withMsgs model [ResetCharacter sourceIndex; PoiseCharacter sourceIndex]
  +
  +        let tickWound characterIndex time timeLocal model =
               match timeLocal with
               | 0L ->
  -                withMsg battleRunning (DamageCharacter characterIndex)
  +                withMsg model (DamageCharacter characterIndex)
               | _ ->
                   let character = getCharacter characterIndex model
                   if character.CharacterState.IsAlly then
                       match character.CharacterAnimationState.CharacterAnimationCycle with
                       | DamageCycle ->
                           if CharacterAnimationState.finished time character.CharacterAnimationState
  -                        then withMsg { battleRunning with CurrentCommandOpt = None } (WoundCharacter characterIndex)
  -                        else just battleRunning
  +                        then withMsg { model with CurrentCommandOpt = None } (WoundCharacter characterIndex)
  +                        else just model
                       | _ -> failwithumf ()
                   else
                       match character.CharacterAnimationState.CharacterAnimationCycle with
                       | DamageCycle ->
                           if CharacterAnimationState.finished time character.CharacterAnimationState
  -                        then withMsg battleRunning (WoundCharacter characterIndex)
  -                        else just battleRunning
  +                        then withMsg model (WoundCharacter characterIndex)
  +                        else just model
                       | WoundCycle ->
                           if CharacterAnimationState.finished time character.CharacterAnimationState
  -                        then withMsg { battleRunning with CurrentCommandOpt = None } (DestroyCharacter characterIndex)
  -                        else just battleRunning
  +                        then withMsg { model with CurrentCommandOpt = None } (DestroyCharacter characterIndex)
  +                        else just model
                       | _ -> failwithumf ()
   
           let tickReady time timeStart model =
               let timeLocal = time - timeStart
               match timeLocal with
  -            | 0L -> withMsg { model with BattleState = BattleRunning (BattleRunning.make ()) } ReadyCharacters
  -            | 30L -> withMsg { model with BattleState = BattleRunning (BattleRunning.make ()) } PoiseCharacters
  +            | 0L -> withMsg model ReadyCharacters
  +            | 30L -> withMsg { model with BattleState = BattleRunning } PoiseCharacters
               | _ -> just model
   
  -        let rec tickCurrentCommand time currentCommand battleRunning model =
  +        let rec tickCurrentCommand time currentCommand model =
               let timeLocal = time - currentCommand.TimeStart
               match currentCommand.ActionCommand.Action with
               | Attack ->
                   let source = currentCommand.ActionCommand.Source
                   let targetOpt = currentCommand.ActionCommand.TargetOpt
  -                let (battleRunning, signals) = tickAttack source targetOpt time timeLocal battleRunning model
  -                ({ model with BattleState = BattleRunning battleRunning}, signals)
  -            | Defend -> just { model with BattleState = BattleRunning battleRunning }
  -            | Consume _ -> just { model with BattleState = BattleRunning battleRunning }
  -            | Special _ -> just { model with BattleState = BattleRunning battleRunning }
  +                tickAttack source targetOpt time timeLocal model
  +            | Defend -> just model
  +            | Consume _ -> just model
  +            | Special _ -> just model
               | Wound ->
                   let source = currentCommand.ActionCommand.Source
  -                let (battleRunning, signal) = tickWound source time timeLocal battleRunning model
  -                match battleRunning.CurrentCommandOpt with
  +                let (model, signal) = tickWound source time timeLocal model
  +                match model.CurrentCommandOpt with
                   | Some _ ->
                       // keep ticking wound
  -                    let model = { model with BattleState = BattleRunning battleRunning }
                       withSig model signal
                   | None ->
                       let (model, signal2) =
  
positive.code:                         then tick time { model with BattleState = BattleCease (false, time) } // tick for frame 0
                          elif Seq.forall (fun character -> character.CharacterState.IsWounded) enemies
                          then tick time { model with BattleState = BattleCease (true, time) } // tick for frame 0
                          else just { model with BattleState = BattleRunning battleRunning }
                      withSig model (signal + signal2)
  
          and tickNoCommand time battleRunning model =
              match battleRunning.ActionQueue with
              | Queue.Cons (currentCommand, nextCommands) ->
                  let command = CurrentCommand.make time currentCommand
                  let model = { model with BattleState = BattleRunning { battleRunning with CurrentCommandOpt = Some command; ActionQueue = nextCommands }}
                  tick time model // tick for frame 0
              | Queue.Nil ->
                  let (allySignals, model) =
                      List.fold (fun (commands, model) ally ->
                          if ally.ActionTime = Constants.Battle.ActionTime
                          then (Command (IndexedCommandCmd (RegularMenuShow, ally.CharacterState.PartyIndex)) :: commands, model)
                          else (commands, model))
                          ([], model)
                          (getAllies model)
                  let (enemySignals, model) =
                      List.fold (fun (commands, model) enemy ->
                          let enemyIndex = EnemyIndex enemy.CharacterState.PartyIndex
                          let allies = getAllies model
                          let allyIndex = (Random ()).Next allies.Length
                          let attack = { Action = Attack; Source = enemyIndex; TargetOpt = Some (AllyIndex allyIndex) }
                          if enemy.ActionTime = Constants.Battle.ActionTime then
                              let model = { model with BattleState = BattleRunning { battleRunning with ActionQueue = Queue.conj attack battleRunning.ActionQueue }}
                              (Message (ResetCharacter enemyIndex) :: commands, model)
                          else (commands, model))
                          ([], model)
                          (getEnemies model)
                  let advanceCharactersSignal = Message AdvanceCharacters
                  let signals = advanceCharactersSignal :: enemySignals @ allySignals
                  withSigs model signals
  
          and tickRunning time battleRunning model =
              match battleRunning.CurrentCommandOpt with
              | Some currentCommand -> tickCurrentCommand time currentCommand battleRunning model
              | None -> tickNoCommand time battleRunning model
  
          and tickCease time timeStart outcome model =
              let timeLocal = time - timeStart
  
negative.code:             let character = updater character
              { model with BattleCharacters = Map.add characterIndex character model.BattleCharacters }
  
          let tickAttack sourceIndex (targetIndexOpt : CharacterIndex option) time timeLocal model =
  
              // if target available, proceed with attack
              let source = getCharacter sourceIndex model
  