         handlers.splice i, 1
         return
 
-  sendCommand: (command, callback) =>
+  sendCommand: (command, callback=noop) =>
     @msgHandlerQueue.push callback
     @send command
 
-  sendCommands: (command_list, callback) =>
+  sendCommands: (command_list, callback=noop) =>
     return if command_list.length == 0
     @msgHandlerQueue.push callback
     @send "command_list_begin\n#{command_list.join("\n")}\ncommand_list_end"



  queueFile: (file) =>
    @sendCommand "add \"#{escape(file)}\"", doNothing, doNothing

  play: =>
    @sendCommand "play", doNothing, doNothing

  pause: =>
    @sendCommand "pause", doNothing, doNothing

  next: =>
    @sendCommand "next", doNothing, doNothing

  prev: =>
    @sendCommand "previous", doNothing, doNothing

  playId: (track_id) =>
    @sendCommand "playid #{track_id}", doNothing, doNothing


      throw "obj already exists"
    list.splice pos, 0, obj

  noop = ->

  escape = (str) ->
    # replace all " with \"
    str.toString().replace /"/g, '\\"'

  createEventHandlers: =>
    registrarNames = [
