Big refactoring => created a new class: GameManager to store the game logic.