refactor random and begin "Matching" feature

Tested on darcy.

optimized fractal algorithm took 24.05 seconds