Fixed all memory leaks (except for the SFML RenderWindow ones that cannot be dealt with)