Added initial code for rng routines.