Added looping and start of settings window