added time functionality in game over, started automatic closing of windows when gui closes