Created TempChangeListener inner class to handle changes.