Added "game completed" functionality for successfully completed games. Fixed global var leak.