Moved gameloop out of constructor