Relocated generate random functions and updated interfaces