Continued refacotring.

Moved a lot of data generation into its own class.