Created data structure for cells, code is much simpler now. Grid colors are preserved now