Refactor MinesweeperCell code