Removed a trivial comment and added a more informative one.
Added some explanation about the way randomness is generated.
Minor code refactoring for readability.
Made a few changes to ensure that compilation has no warnings at all.
The new compiler is more strict with issuing warnings.
Simplified the seeding of the (cryptographically insecure) random generator.
Now it works directly from /dev/random, rather than via as an md5 hash of
/dev/random.