       'peteshow-hide'             : @hide
       'fill-out-forms'            : @controller.fillOutForms
       'fill-out-forms-and-submit' : @controller.fillOutFormsAndSubmit
-      'save-last-session'         : @controller.saveSession
+      'save-session'              : @controller.saveSession
       'cancel-session'            : @hideSaveSession
       'toggle-save'               : @toggleSaveSession
 

  update: ->
    lastSession = store.get('last_session')
    sessions    = store.get('sessions')

    $(@$sessions).html(
      sessionsTemplate
        lastSession     : lastSession
        lastSessionName : @controller.sessionName(lastSession)
        sessions        : sessions
    )

  _createEvents: (events) ->
    for key, value of events
      $('body').on 'click', "[data-action='#{key}']", (e) =>
        e.preventDefault()
        e.stopPropagation()
        events["#{e.currentTarget.dataset.action}"]()

    $(document).keydown @_handleKeydown

    @$drag = new Draggabilly(
      @$peteshow,
      handle      : @$handle,
      containment : 'html'
    )

    @$drag
      .on 'dragEnd', @_handleDragEnd
      .on 'staticClick', @open

    $('body').on 'change', '.peteshow-menu input:radio', (e) =>
      id = $(e.currentTarget).data('session')
      @controller.setSession(id)
      return

  _handleKeydown: (e) =>
    code = String.fromCharCode(e.keyCode)


  getSaveDetails: ->
    return {
      title: $(@$saveDialog).find('[name="peteshow-title"]').val()
      notes: $(@$saveDialog).find('[name="peteshow-notes"]').val()
    }

  setSession: (id) ->
