Minor changes: float conversion and rename rnd into rng