Added pseudo-random number generator initialisation.