Removed the need to consider the boundaries of each row for each and
every element in the row. It only really needs to happen once in a row,
so I've moved it out of the cell-processing loop and into the row
processing.