random_numbers is now set up as a function

It can still be run with command-line arguments, but could also
be imported and used in other code properly now. Some comments
added as well.
More of the same