Simplified min searches, and removed 1E-6 threshold (doesn't seem necessary), see #39