Added logic for pausing and clearing the board