Made the simulation into its own class.