Improved rand() functions, again.