Improve the generator.sh