Some more fixes.
Initial version on new rng project.