     else
       @list.scrollBottom desiredBottom
 
+  ###
+   * Returns the currently selected item view
+   * @return {jQuery}
+   * @private
+  ###
   getSelectedItemView: ->
     @list.find "li.selected"
 
+  ###
+   * Returns the currently selected item (NOT the view)
+   * @return {Object}
+   * @private
+  ###
   getSelectedItem: ->
     @getSelectedItemView().data "select-list-item"
 
+  ###*
+   * Confirms the currently selected item or cancels the list view
+   * if no item has been selected
+   * @private
+  ###
   confirmSelection: ->
     item = @getSelectedItem()
     if item?

      if $(e.target).closest("li").hasClass "selected"
        @confirmSelection()

  setMaxItems: (@maxItems) -> return

  setItems: (items=[]) ->
    @items = items
    @populateList()

  selectPreviousItemView: ->
    view = @getSelectedItemView().prev()
    unless view.length
      view = @list.find "li:last"
    @selectItemView view

  selectNextItemView: ->
    view = @getSelectedItemView().next()
    unless view.length
      view = @list.find "li:first"
    @selectItemView view

  selectItemView: (view) ->
    return unless view.length


    else
      @cancel()

  ###
   * Focuses the hidden input, starts listening to keyboard events
   * @private
  ###
  setActive: ->
    @hiddenInput.focus()

