Moved datagen; modified it for demo