Reworked argument parsing for generator