Remove dependency on srand() and predictable output from rand()