clean up type sigs; simplify findBestMatching
use randoms and remove unneeded