Added temperature loop to Main