CINE: Reduce the scope of some variables, optimize a couple of iterator increment