Added functionality for finishing game.