merge demo into master; change variable "cIdx" to "slideIdx"