Refactor temperature annealing