Improved state cell clearing; implemented clearCellState()