Update simple_generator.rb

Refactor a bit