Cleanup the read_temp code