More features for the game and fixed memory leaks