Moved rng to module