Modifications to data generator, small bug fixes