Modified regexp in split_cells to allow for whitespace on the ends of lines.