Moved reset code to rng.js