       if $(e.target).closest("li").hasClass "selected"
         @confirmSelection()
 
-  setMaxItems: (@maxItems) -> return
-
-  setItems: (items=[]) ->
-    @items = items
-    @populateList()
-
+  ###
+   * Selects the previous item view
+   * @private
+  ###
   selectPreviousItemView: ->
     view = @getSelectedItemView().prev()
     unless view.length
       view = @list.find "li:last"
     @selectItemView view
 
+  ###
+   * Selects the next item view
+   * @private
+  ###
   selectNextItemView: ->
     view = @getSelectedItemView().next()
     unless view.length
       view = @list.find "li:first"
     @selectItemView view
 
+  ###
+   * Sets the items, displays the list
+   * @param {Array} items
+   * @private
+  ###
+  setItems: (items=[]) ->
+    @items = items
+    @populateList()
+
+  ###
+   * Unselects all views, selects the given view
+   * @param  {jQuery} view
+   * @private
+  ###
   selectItemView: (view) ->
     return unless view.length
 

          when Keys.Escape
            @trigger "core:cancel"

        if e.keyCode in _.values(Keys)
          return false

  populateList: ->
    return unless @items?


      @ol class: "list-group", outlet: "list"

  ###
   * Listens to events, delegates them to instance methods
   * @private
  ###
  initialize: ->
    # Core events for keyboard handling
    @on "core:move-up", (e) => @selectPreviousItemView()
    @on "core:move-down", => @selectNextItemView()
    @on "core:confirm", => @confirmSelection()
    @on "core:cancel", => @cancel()

    # List mouse events
    @list.on "mousedown", "li", (e) =>
      e.preventDefault()
      e.stopPropagation()
