   window.mainSlideDeck = deck = revealjsDomToSlideDeck()
   initSlide = deck.get(Reveal.getIndices())
   initState = new core.PresentationState(deck, initSlide)
-  CURRENT_LOCAL_SLIDE_STATE = initState
+  setSlideState(initState)
   initState
 
 initEventstreamSubscriptions = ->

    streams.localSlideStateChangeStream.onNext(
      new core.StateChange(
        event: ev, prevState: prevState, newState: newState))
    CURRENT_LOCAL_SLIDE_STATE = newState
    newState
  catch err
    net.log(err) #TODO: replace this with an error record

utils = require "./utils"

CURRENT_LOCAL_SLIDE_STATE = null
setSlideState = (state) ->
  CURRENT_LOCAL_SLIDE_STATE = state
exports.getCurrentState = () -> CURRENT_LOCAL_SLIDE_STATE

################################################################################

