Put random number generation into its own class.