Fix warnings
Refactor tests and test annealing_level