     }
     
     /**
-       This will see the visibility of all the rows to true, and thus make it appear on the app
+     Update the visibleRowsInSection array with the indexes of the cells which are currently visible
+     This is called before the table view is filled with the corresponding cells
      */
     func getIndicesOfVisibleRows() {
-        visibleRowsInSection.removeAll()
+        visibleRowsInSection.removeAll()//To prevent duplicate cells
         
         for currentSectionCells in cellDescriptors {
             var visibleRows = [Int]()

            }
            else if let secondaryTitle = currentCellDescriptor["secondaryTitle"] {
                print("\(secondaryTitle)")
                cell.textLabel?.text = secondaryTitle as? String
            }
        }
        

//
//

public class QExpandableTableView: UIViewController, UITableViewDelegate, UITableViewDataSource {
    public var cellDescriptors: NSMutableArray!
    public var visibleRowsInSection = [[Int]]()
    
    override public func viewDidLoad() {
        super.viewDidLoad()
    }
    
    override public func viewWillAppear(animated: Bool) {
        super.viewWillAppear(animated)
    }
    
    /**
     Assigns tableview delegates and registers all required nibs for cells
     
     - parameter tableView: the tableView which will be given from the child class
     */
    public func configureTableView(tableView: UITableView) {
        tableView.delegate = self
        tableView.dataSource = self
