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

  @init: (cookieName, contextPath) ->
    # Check for old state information
      
    stateCookie = (if org.cometd.COOKIE then org.cometd.COOKIE.get(cookieName) else null)
    state = (if stateCookie then org.cometd.JSON.fromJSON(stateCookie) else null)
    $.cometd.getExtension("reload").configure 
      cookieMaxAge: 10
    

        @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
    console.log "Subscribed to exp channels " + channel
    
  @subscribe: ->
