Made GUI code independent of the temperature profile