Refactor GameOfLife