         console.log "received invalid operation", op
         throw "Packet error: Invalid operation!"
 
+  # highlights the current line of an simulation
   simulateLine = (packet) ->
     line = packet.line || 0
     throw "Packet error: line '#{line}' is not a valid line" unless line > 0
     CodeGUI.highlightLine line
 
+  # show variable allocation
   simulateAllocations = (packet) ->
     allocations = packet.allocations
     for name of allocations
       CodeGUI.WatchList.setAllocation name, allocations[name]
 
+  # simulate console output
   simulateMessages = (packet) ->
     messages = packet.messages
     validateArray "messages", messages

    @packetQueue = []
    @usedIDs.push @currentId

  @update = () =>
    if !Simulation.isInExecutionMode then return


    for messageObj in messages
      msg = messageObj.message

      # allows more message types via event handling
      event = new CustomEvent('socketHandlerSimulateMessage', {
        'detail': messageObj
        'cancelable': true
