Updated cube subdivision code

* fixed setting of indices for sub quads.