Fixed up the optional arguments, and added a minimum delta setting.
Added a global default for the minimum delta.