         @finishExperiment_cb?()
     
   @subscribeExp: (channel) ->
-    @expServiceSubscription = $.cometd.subscribe
-      Codec.expSvcPrefix + channel, (message) => @serviceMessage_cb? message.data
-    @expBroadcastSubscription = $.cometd.subscribe
-      Codec.expChanPrefix + channel, (message) => @broadcastMessage_cb? message.data
+    @expServiceSubscription = $.cometd.subscribe Codec.expSvcPrefix + channel, (message) => @serviceMessage_cb? message.data
+    @expBroadcastSubscription = $.cometd.subscribe Codec.expChanPrefix + channel, (message) => @broadcastMessage_cb? message.data
     console.log "Subscribed to exp channels " + channel
     
   @subscribe: ->

      @connected = false if message.successful
    
    # Initialize CometD 
    cometURL = location.protocol + "//" + location.host + ":9876" + contextPath + "/cometd"
    $.cometd.websocketEnabled = true
    $.cometd.init
      url: cometURL

    $.cometd.unsubscribe @expServiceSubscription if @expServiceSubscription
    @expServiceSubscription = null
      
  @sendExperimentBroadcast: (msg) =>
    @channelSend @expBroadcastSubscription[0], msg
    
  @sendExperimentService: (msg) =>
    @channelSend @expServiceSubscription[0], msg
  
  @channelSend: (channel, msg) ->
