cleanup of interface, fix bug in setDet
use binary search, reorder to fir cache lines