     ///   - pageOffset: The current page scroll offset
     ///   - scrollView: The scroll view that is being scrolled.
     /// - Returns: Whether a page transition has been detected.
-    private func detectCurrentPageIndexIfNeeded(pagePosition: CGFloat, scrollView: UIScrollView) -> Bool {
+    private func detectNewPageIndexIfNeeded(pagePosition: CGFloat, scrollView: UIScrollView) -> Bool {
         guard var currentIndex = self.currentIndex else {
             return false
         }

    }
    
    public func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
        ensureScrollViewIsActual(scrollView: scrollView, then: {
            if self.autoScroller.cancelsOnScroll {
                self.autoScroller.cancel()
            }
        })
    }
    
    public func scrollViewDidEndScrollingAnimation(_ scrollView: UIScrollView) {
        ensureScrollViewIsActual(scrollView: scrollView, then: {
            self.scrollView(didEndScrolling: scrollView)
        })
    }
    
    public func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
        ensureScrollViewIsActual(scrollView: scrollView, then: {
            self.scrollView(didEndScrolling: scrollView)
        })
    }
    
    public func scrollViewWillEndDragging(_ scrollView: UIScrollView,
                                          withVelocity velocity: CGPoint,
                                          targetContentOffset: UnsafeMutablePointer<CGPoint>) {
        ensureScrollViewIsActual(scrollView: scrollView, then: {
            self.updateContentOffsetForBounceIfNeeded(scrollView: scrollView)
        })
    }
    
    private func scrollView(didEndScrolling scrollView: UIScrollView) {
        ensureScrollViewIsActual(scrollView: scrollView, then: {
            if self.autoScroller.restartsOnScrollEnd {
                self.autoScroller.restart()
            }
            self.expectedTransitionIndex = nil
        })
    }
    
    private func ensureScrollViewIsActual(scrollView: UIScrollView, then action: () -> Void) {
        if scrollViewIsActual(scrollView) {
            action()
        }
    }
}


    ///   - pageSize: The current page size.
    ///   - indexDiff: The expected difference between current / target page indexes.
    /// - Returns: The relative page position.
    private func calculatePagePosition(for contentOffset: CGFloat,
                              pageSize: CGFloat,
                              indexDiff: CGFloat) -> CGFloat? {
        guard let currentIndex = self.currentIndex else {
