     @show @slide
 
   replace: (position, slideHtml) ->
-    slide = if @getCurrentSlidePosition() is position then position else @slide
+    slide = if @_getCurrentSlidePosition() is position then position else @slide
     @slides().eq(position).before(slideHtml).remove()
     @show slide
 
   delete: (position) ->
-    if @getCurrentSlidePosition() is position
-      slide = if @size() - 1 is position then 0 else @getCurrentSlidePosition()
+    if @_getCurrentSlidePosition() is position
+      slide = if @size() - 1 is position then 0 else @_getCurrentSlidePosition()
     else
       slide = @slide
     @slides().eq(position).remove()

  # Motion

  show: (query) ->
    @slide = @getSlide(query)
    @slides().hide().filter(@slide).show()

  next: ->
    @show @getNextSlidePosition()

  prev: ->
    @show @getPrevSlidePosition()

  first: ->
    @show 0

  size: ->
    @slides().size()

  _getCurrentSlidePosition: (slide = @slide) ->
    currentPosition = -1
    $.each @slides(), (index, element) ->
      if slide.get(0) is element
        currentPosition = index
    currentPosition

  _getNextSlidePosition: ->
    currentPosition = @_getCurrentSlidePosition()
    if currentPosition + 1 is @size() then 0 else currentPosition + 1

  _getPrevSlidePosition: ->
    currentPosition = @_getCurrentSlidePosition()
    if currentPosition is 0 then @size() - 1 else currentPosition - 1

  _getSlide: (query) ->
    if $.isNumeric(query)
      @slides().eq(query)
    else if toString.call(query) is '[object String]'
      @slides().filter(query)
    else
      query

  # DOM manipulation

