anchor.diff:          let parts = split (path.[1..]) '/' // That annoying first slash...
           printfn "Parts: %A" parts
           // Now interpret what was received
  -        let (updated_node, answer, status, reason) =
  +        let result =
               match parts with
  -            | "pastry"::cmd::dst ->
  -                printfn "%A" route
  -                match cmd with
  -                | "join"    ->
  -                    node, "Unsupported", 404, "Not Found" //route node Join cmd dst body
  -                | "update"  ->
  -                    node, "Unsupported", 404, "Not Found" //route node Update cmd dst body
  -                | "route"   ->
  -                    node, "Unsupported", 404, "Not Found" //route node Route cmd dst body
  -                | _         ->
  -                    error <| sprintf "Received bad pastry command: '%s'" cmd
  -                    node, (sprintf "Bad pastry command: '%s'" cmd), 400, "Not Found"
  +            | "pastry"::cmd_string::dst_string::[] ->
  +                match deserialize_guid dst_string with
  +                | Some(guid) ->
  +                    printfn "%A" route
  +                    match cmd_string with
  +                    | "join" ->
  +                        reply response "Send attempted!" 200 "Ok"
  +                        Valid(route node Join body guid)
  +                    | "update" ->
  +                        reply response "Send attempted!" 200 "Ok"
  +                        Valid(route node Update body guid)
  +                    | "route" ->
  +                        reply response "Send attempted!" 200 "Ok"
  +                        Valid(route node Route body guid)
  +                    | "joinstate" ->
  +                        reply response "Received!" 200 "Ok"
  +                        Valid(handle_message node JoinState body guid)
  +                    | _ ->
  +                        let error_message = sprintf "Bad pastry command: '%s'" cmd_string
  +                        Invalid(error_message, 400, "Not Found")
  +                | None ->
  +                    let error_message = sprintf "Invalid GUID received: '%s'" dst_string
  +                    Invalid(error_message, 404, "Not found")
   
               | "pastry"::stuff -> // only handles '/pastry'
  -                error <| sprintf "Bad pastry request url gotten: %s" path
  -                node, (sprintf "Unrecognized pastry request url: '%s'" path), 400, "Illegal action"
  +                let error_message = sprintf "Unrecognized pastry request url: '%s'" path
  +                Invalid(error_message, 400, "Illegal action")
               | _ ->
  -                error <| sprintf "Got something not related to pastry: %s" path
  -                node, (sprintf "Not related to pastry: %s" path), 404, "Not found"
  -        reply response answer status reason
  -        listen updated_node // Listen again
  -
  -    listen node // Start listening
  +                let error_message = sprintf "Not related to pastry: %s" path
  +                Invalid(error_message, 404, "Not found")
  +
  +        match result with
  +        | Valid(updated_node) ->
  +            listen updated_node // Listen again
  +        | Invalid(error_message, status, reason) ->
  +            error error_message
  +            reply response error_message status reason
  +
  +    ignore <| listen node // Start listening
   
   // Creates a local node and makes it join the Pastry network
  -let join_network (address: NetworkLocation) (peer: NetworkLocation option): Node =
  +let join_network (address: NetworkLocation) (peer: NetworkLocation option) =
       let guid = hash address
  +    let (a, b) = guid
  +    printfn "? Pastry GUID: %020d%020d" a b
       let node = {
  -        id = guid;
  +        guid = guid;
           address = address;
           leaves = Map.empty;
           minleaf = guid;
  
positive.code:     match args with
      | [|addr; port; peer|] ->
          let address = sprintf "%s:%s" (if addr = "" then get_public_ip() else addr) port
          printfn "Joining pastry network at '%s'..." address
          let known_peer = if peer = "" then None else Some(peer)
          let node = join_network address known_peer
          ()
  
negative.code:     response.OutputStream.Write(buffer,0,buffer.Length);
      response.OutputStream.Close();
  
  // Calculates the absolute distance between two GUIDs
  let distance (a: GUID) (b: GUID) : U128 =
      let (a1, a2) = a
      let (b1, b2) = b // below: Unsigned shenanigans
      let n1 = if a1 > b1 then a1 - b1 else b1 - a1
      let n2 = if a2 > b2 then a2 - b2 else b2 - a2
      (n1, n2)
  
  // Serializes the state of the given node
  let serialize (node: Node) : string =
      JsonConvert.SerializeObject node
  
  let SEPARATOR = " SEPARATOR " // This is silly...
  // Handles a message intended for this node
  let handle_message (node: Node) (typ: MessageType) (msg: string) (key: GUID) =
      printfn "PASTRY: Handling '%A' message '%s'..." typ msg
      match typ with
      | Join ->
          let firstsep = msg.IndexOf(SEPARATOR)
          let address = msg.[..firstsep-1]
          let states = msg.[firstsep + SEPARATOR.Length..]
          // Failure is unimportant here, no?
          ignore <| send_message address JoinState states key
          node
      | _ ->
          node
  
  // Messages
  // Join: join address
  // Routes a message somewhere
  let route (node: Node) (typ: MessageType) (msg: string) (key: GUID) =
      printfn "PASTRY: Routing '%A' message towards '%A'" typ key
      let message =
          match typ with // This is actually okay since the nodes contain no strings
          | Join ->
              // NOTE NOTE NOTE ------- remove later!
              // Simulate some latency on localhost
              printfn "Sleeping before forwarding join..."
              Thread.Sleep(10000)
              printfn "Done! Continuing..."
  
              sprintf "%s%s%s" msg SEPARATOR (serialize node)
          | _ -> msg
  
      // Within leaf set
      if (node.minleaf <= key && key <= node.maxleaf) || Map.isEmpty node.leaves then
          printfn "PASTRY: Found target within leaf set!"
          let distance_check = fun leafkey _ acc ->
              if distance leafkey key < distance acc key then leafkey else acc
          let closest = Map.foldBack distance_check node.leaves node.guid
          if closest = node.guid then
              handle_message node typ message key
          else
              let address = Map.find closest node.leaves
              match send_message address typ message key with
              | None -> error <| sprintf "Failed to send message to %s" address
              | Some(_) -> ()
              node
      else
          printfn "PASTRY: Checking routing table..."
          node
  
  // Convert a byte array to an u64. Please don't use an array that is more than
  // 8 bytes long... (tip: You get undefined behavior)
  