Comment correction for env.h.
Refactor the random class and add tests.