Refactored data-generator.rb and support files