anchor.diff:          sendMessage shellSocket msg "connect_reply" reply
   
       /// Handles a 'shutdown_request' message
  -    let shutdownRequest (msg : KernelMessage) =
  +    let shutdownRequest (msg : KernelMessage) (content : ShutdownRequest) =
   
           // TODO: actually shutdown        
  -        let content = match msg.Content with ShutdownRequest x -> x | _ -> failwith ("system error")
           let reply = { restart = true; }
   
           sendMessage shellSocket msg "shutdown_reply" reply
   
       /// Handles a 'history_request' message
  -    let historyRequest (msg : KernelMessage) =
  -
  -        let content = match msg.Content with HistoryRequest x -> x | _ -> failwith ("system error")
  +    let historyRequest (msg : KernelMessage) (content : HistoryRequest) =
  +
           // TODO: actually handle this
           sendMessage shellSocket msg "history_reply" { history = [] }
   
       /// Handles a 'object_info_request' message
  -    let objectInfoRequest (msg : KernelMessage) =
  +    let objectInfoRequest (msg : KernelMessage) (content : ObjectInfoRequest) =
           // TODO: actually handle this
           ()
   
  
positive.code:             let msg = recvMessage (shellSocket)
  
              try
                  match msg.Header.msg_type with
                  | "kernel_info_request" -> kernelInfoRequest (msg) 
                  | "execute_request"     -> executeRequest (msg) 
                  | "complete_request"    -> completeRequest (msg) 
                  | "connect_request"     -> connectRequest (msg)
                  | "shutdown_request"    -> shutdownRequest (msg)
                  | "history_request"     -> historyRequest (msg)
                  | "object_info_request" -> objectInfoRequest (msg)
                  | _                     -> logMessage (String.Format("msg_type not implemented {0}", msg.Header.msg_type))
              with 
              | ex -> handleException ex
     
  
negative.code: 
      let pyout (message) = sendDisplayData "text/plain" message "pyout"
  
      /// Preprocesses the code and evaluates it
      let preprocessAndEval(code) = 
  
          logMessage code
  
          // preprocess
          let results = compiler.NuGetManager.Preprocess(code)
          let newCode = String.Join("\n", results.FilteredLines)
  
          // do nuget stuff
          for package in results.Packages do
              if not (String.IsNullOrWhiteSpace(package.Error)) then
                  pyout ("NuGet error: " + package.Error)
              else
                  pyout ("NuGet package: " + package.Package.Value.Id)
                  for assembly in package.Assemblies do
                      let fullAssembly = compiler.NuGetManager.GetFullAssemblyPath(package, assembly)
                      pyout ("Referenced: " + fullAssembly)
  
                      let code = String.Format(@"#r @""{0}""", fullAssembly)
                      fsiEval.EvalInteraction(code)
  
          if not <| String.IsNullOrEmpty(newCode) then
              fsiEval.EvalInteraction(newCode)
      
      /// Handles an 'execute_request' message
      let executeRequest(msg : KernelMessage) (content : ExecuteRequest) = 
          
          // clear some state
          sbOut.Clear() |> ignore
  