Renamed some things, and added some documentation.
Fixed a bug causing mutate to write out-of-bounds in simulated annealing.