More defensive programming.
Simpler API.
Added min consolidator.