Cleanup

This contains some cleanup and feature additions for annealing.