anchor.diff:  
       [<Fact>]
       let ``blah`` () : unit =
  -        let onChildAdded (evt : PersonAddedEvent) =
  +        let onChildAdded (evt : PersonAddedEvent) (state : unit) =
               match evt.ParentId with
  -            | Some parentId -> Some (parentId.ToString(), Seq.singleton ({ Id = parentId; ChildId = evt.Id } :> obj))
  -            | None -> None
  +            | Some parentId -> Seq.singleton ({ Id = parentId; ChildId = evt.Id } :> obj)
  +            | None -> Seq.empty
   
           async {
               let! connection = getConnection()
  
positive.code: 
              let myCmdHandler (cmd : AddPersonCommand) (state : unit) =
                 Choice1Of2 (Seq.singleton ({ PersonAddedEvent.Id = cmd.Id; Name = cmd.Name; ParentId = cmd.ParentId } :> obj)) 
  
              let config = 
                  EventProcessingConfiguration.Empty
                  |> EventProcessingConfiguration.addCommand (fun (cmd : AddPersonCommand) -> cmd.Id.ToString()) myStateBuilder myCmdHandler
  
              let model = new EventModel(connection, config)
              model.RegisterHandler onChildAdded
  
              do! model.Start() |> Async.Ignore
              
  
negative.code:                 | _ -> failwith <| sprintf "Unexpected command type: %A" (cmdObj.GetType())
              config
              |> (fun config -> { config with CommandHandlers = config.CommandHandlers |> Map.add cmdType (typeof<'TCmd>, outerHandler) })
          let addEvent<'TEvt, 'TState> (toId: 'TEvt -> string option) (stateBuilder : IStateBuilder) (handler : 'TEvt -> 'TState -> seq<obj>) (config : EventProcessingConfiguration) =
              let evtType = typeof<'TEvt>.Name
              let outerHandler (evtObj : obj) : option<(string * IStateBuilder * (obj -> seq<obj>))> =
                  let realHandler (evt : 'TEvt) : option<(string * IStateBuilder * (obj -> seq<obj>))> =
                      let stream = toId evt
                      match stream with
                      | Some stream -> 
                          let realRealHandler = 
                              let blah = handler evt
                              fun (state : obj) ->
                                  blah (state :?> 'TState)
                          Some (stream, stateBuilder, realRealHandler)
                      | None -> None
                  match evtObj with
                  | :? 'TEvt as evt -> realHandler evt
                  | _ -> failwith <| sprintf "Unexpected event type: %A" (evtObj.GetType())
              { config with EventHandlers = config.EventHandlers |> Map.add evtType (typeof<'TEvt>, outerHandler) }
      type EventModel (connection : IEventStoreConnection, config : EventProcessingConfiguration) =
  
          member x.Start () = 
              connection.SubscribeToAllAsync(false, (fun subscription event -> x.EventAppeared event event.Event.EventId |> Async.RunSynchronously )) |> Async.AwaitTask
  
          member x.EventAppeared (event : ResolvedEvent) eventId : Async<unit> =
              log <| sprintf "Received: %A: %A" eventId event.Event.EventType
  
              match config.EventHandlers |> Map.tryFind event.Event.EventType with
              | Some (t,handler) -> 
                  let evt = deserializeObj (event.Event.Data) t
                  match handler evt with
                  | Some (stream, stateBuilder, handler') -> 
                      let state = stateBuilder.Zero
                      let result = handler' state
                      let eventData = 
                          result
                          |> Seq.map (fun x -> new EventData(Guid.NewGuid(), x.GetType().Name, true, serialize(x), null))
                          |> Array.ofSeq
                      connection.AppendToStreamAsync(stream, EventStore.ClientAPI.ExpectedVersion.Any, eventData).ContinueWith((fun _ -> ())) |> Async.AwaitTask  
                  | None -> async { return () } 
              | None -> async { return () }
  
          member x.RunCommand cmd streamId =
              let cmdKey = cmd.GetType().FullName
  