Refactoring of the `script_generator.au3` script