Streamlined some data generation functions