Refactoring Minesweeper