The random methods are extracted to random.h.