 
 import Foundation
 
+
 protocol KSICCoordinator: class {
+    
+    /// The carousel that being show on screen
     var carousel: KSICImageScrollerViewController? { get }
+    
+    /// The model (images that need to be show on carousel)
     var model: [KSImageCarouselDisplayable] { get }
+    
+    /// View model for the carousel, this array will always have 3 elements.
+    /// The 3 elements consists of [prev page element, current page element, next page element]
+    /// nil in carouselViewModel indicates that no more data to show and carousel will not be able to scroll to next page / previous page anymore
     var carouselViewModel: [KSImageCarouselDisplayable?] { get }
+    
+    /// Current page of the carousel
     var currentPage: Int { get }
     
+    /// Add the carousel to it's container
     func showCarousel()
+    
+    /// Go to next page
     func nextPage()
+    
+    /// Go to previous page
     func previousPage()
 }
 

        return currentPage == lastPage
    }
    
    fileprivate func isPageInRange(_ page: Int) -> Bool {
        return  (page >= firstPage && page <= lastPage)
    }
}


class KSICFiniteCoordinator: KSICCoordinator {
    
    let model: [KSImageCarouselDisplayable]
    
    private var _carousel: KSICImageScrollerViewController?

        }
    }
    
    /// Initializer
    ///
    /// - Parameters:
    ///   - model: Model for carousel
    ///   - initialPage: Page to display when carousel first shown
    /// - Throws: emptyModel, pageOutOfRange
    init(with model: [KSImageCarouselDisplayable], initialPage: Int) throws {
        
        // Make sure model is not empty
