anchor.diff:      let workflow, name = eventName
   
       //Det skal lige chekkes om workflow'et ekesitire
  -    Ok(update_inner_map workflow (fun x -> Map.add name (false, n) x) repository)
  +    update_inner_map workflow (fun x -> MapOk(Map.add name (false, n) x)) repository
   
   /// Return name and state of given event
   let get_event_state (eventName : EventName) (repository : Repository) : (string*EventState) =
  
positive.code: 
      let workflow, name = eventName
      let event = get_event eventName repository
      let inner (x : Map<string, bool*Event>) = 
          match Map.tryFind name x with
              | Some(x') ->
                  let lock, event = x'
                  Map.add name (lock, {event with executed = true; pending = false}) x
              | None -> failwith "Missing Event"
      
      if not event.included
      then NotExecutable
  
negative.code:         //Check conditions
          printfn "Send: checks alle the contitions :P"
          if Set.isEmpty event.roles 
          then update_inner_map workflow inner repository
          //{event with executed = true; pending = false})
          else
              if check_roles eventName usersRoles repository
              then update_inner_map workflow inner repository
              else Unauthorized
  
  /// Adds given roles to given event and returns the result
  let add_event_roles (eventName : EventName) (roles : Roles) (repository : Repository) : Result =
      let inner (event : Event) : UpdateEventResult =
          EventOk({event with roles = Set.fold (fun x y -> x.Add y) event.roles roles})
      update_inner_event eventName inner repository
  
  /// Adds given relationships (going from first given event) to given event and returns the result
  let add_relation_to (fromEvent : EventName) (relations : RelationType) (toEventName : EventName) (sendFunc : SendFunc<'a>) (repository : Repository) : Result =
      //Dummy
      printfn "Send: Add fromRelation (%A %A) to %A" fromEvent relations toEventName
  
      let inner (event : Event) : UpdateEventResult =
          EventOk({event with toRelations = Set.add (relations, toEventName) event.toRelations})
      update_inner_event fromEvent inner repository
  
  /// Adds given relationships (going to given event) to given event and returns the result
  let add_relation_from (toEvent : EventName) (relations : RelationType) (fromEventName : EventName) (repository : Repository) : Result =
      let inner (event : Event) : UpdateEventResult =
          EventOk({event with fromRelations = Set.add (relations, fromEventName) event.fromRelations})
      update_inner_event toEvent inner repository
  
  /// Removes given relation form given event and returns the result
  let remove_relation_to (fromEvent : EventName) (relations : RelationType) (toEventName : EventName) (sendFunc : SendFunc<'a>) (repository : Repository) : Result =
      //Dummy
      printfn "Send: remove fromRelation (%A %A) to %A" fromEvent relations toEventName
  
      let inner (event : Event) : UpdateEventResult =
          if Set.contains (relations, toEventName) event.toRelations
          then EventOk({event with toRelations = Set.remove (relations, toEventName) event.toRelations})
          else EventErr(MissingRelation)
      update_inner_event fromEvent inner repository
  
  /// Removes given relation form given event and returns the result
  let remove_relation_from (toEvent : EventName) (relations : RelationType) (fromEventName : EventName) (sendFunc : SendFunc<'a>) (repository : Repository) : Result =
      let inner (event : Event) : UpdateEventResult =
          if Set.contains (relations, fromEventName) event.toRelations
          then EventOk({event with toRelations = Set.remove (relations, fromEventName) event.toRelations})
          else EventErr(MissingRelation)
      update_inner_event toEvent inner repository
  
  /// Deletes given event and returns it if its susesful
  let delete_event (eventName : EventName) (sendFunc : SendFunc<'a>) (repository : Repository) : Result =
  