     @overlay.once 'click', @bound 'destroy'  if overlayClick
 
 
-  createButton:(title, buttonOptions)->
+  createButton: (title, buttonOptions) ->
     buttonOptions.title    = title
-    buttonOptions.delegate = @
+    buttonOptions.delegate = this
     itemClass = buttonOptions.itemClass
     delete buttonOptions.itemClass
     @buttonHolder.addSubView button = new (itemClass or KDButtonView) buttonOptions
     button.on 'KDModalShouldClose', => @emit 'KDModalShouldClose'
     button
 
-  setContent:(content)->
+
+  setContent: (content) ->
     @modalContent = content
     @getDomElement().find(".kdmodal-content").html content
 
-  display:->
+
+  display: ->
     if @getOptions().fx
       @utils.defer =>
         @setClass "active"
 
-  cancel:->
+
+  cancel: ->
     return unless @getOptions().cancelable
     @emit 'ModalCancelled'
     @destroy()
 
-  destroy:->
+
+  destroy: ->
     $(window).off "keydown.modal"
-    uber = KDView::destroy.bind @
+    uber = KDView::destroy.bind this
 
     if @options.fx
       @unsetClass "active"

      newRules.opacity = 1
      @$().css newRules

  _windowDidResize:->
    @setPositions()
    {innerHeight} = window
    @$('.kdmodal-content').css maxHeight : innerHeight - 120


    @buttons[defaultFocusTitle]?.setFocus()  if not focused and defaultFocusTitle


  destroyButtons: ->
    button.destroy()  for own _key, button of @buttons


  click:(e) ->
    @cancel() if $(e.target).is(".closeModal")
    if $(e.target).is(".showHelp")
      {helpContent} = @getOptions()
