Separated the game loop and deletet unused files