Implements #6086

Implements #6086 - Number and offsets of SubCells should not be hardcoded
Sometimes I forget that MonoDevelop reformats moved and pasted code.